diff mbox series

[05/12] accessiblity/speakup: genmap and makemapdata require linux/version.h

Message ID 20240807-macos-build-support-v1-5-4cd1ded85694@samsung.com
State New
Headers show
Series Enable build system on macOS hosts | expand

Commit Message

Daniel Gomez via B4 Relay Aug. 6, 2024, 11:09 p.m. UTC
From: Daniel Gomez <da.gomez@samsung.com>

Both genmap and makemapdata require the linux/version.h header. To
ensure successful builds on macOS hosts, make sure usr/include is
included in the HOSTCFLAGS.

Fixes errors:
drivers/accessibility/speakup/genmap.c:13:10: fatal error: 'linux/version.h' file not found
   13 | #include <linux/version.h>
      |          ^~~~~~~~~~~~~~~~~
1 error generated.

drivers/accessibility/speakup/makemapdata.c:13:10: fatal error: 'linux/version.h' file not found
   13 | #include <linux/version.h>
      |          ^~~~~~~~~~~~~~~~~
1 error generated.

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
 drivers/accessibility/speakup/Makefile | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/accessibility/speakup/Makefile b/drivers/accessibility/speakup/Makefile
index 6f6a83565c0d..74ee0c31370f 100644
--- a/drivers/accessibility/speakup/Makefile
+++ b/drivers/accessibility/speakup/Makefile
@@ -38,6 +38,7 @@  clean-files := mapdata.h speakupmap.h
 # Generate mapdata.h from headers
 hostprogs += makemapdata
 makemapdata-objs := makemapdata.o
+HOSTCFLAGS_makemapdata.o += -I$(srctree)/usr/include
 
 quiet_cmd_mkmap = MKMAP   $@
       cmd_mkmap = TOPDIR=$(srctree) \
@@ -51,6 +52,7 @@  $(obj)/mapdata.h: $(obj)/makemapdata
 # Generate speakupmap.h from mapdata.h
 hostprogs += genmap
 genmap-objs := genmap.o
+HOSTCFLAGS_genmap.o += -I$(srctree)/usr/include
 $(obj)/genmap.o: $(obj)/mapdata.h
 
 quiet_cmd_genmap = GENMAP  $@