Files
gentoo/net-misc/linuxptp/files/linuxptp-4.4-user_cpp.patch
Thomas Beierlein 4a9cbf9357 net-misc/linuxptp: add 4.4
Closes: https://bugs.gentoo.org/941727
Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
2024-12-15 11:03:49 +01:00

25 lines
789 B
Diff

--- a/incdefs.sh
+++ b/incdefs.sh
@@ -27,7 +27,7 @@
printf " -D_GNU_SOURCE"
# Get list of directories searched for header files.
- dirs=$(${CC} -E -Wp,-v -xc /dev/null 2>&1 >/dev/null | grep ^" /")
+ dirs=$(echo "" | ${CPP} -Wp,-v - 2>&1 >/dev/null | grep ^" /")
# Look for clock_adjtime().
for d in $dirs; do
diff --git a/makefile b/makefile
index 3c2406b..c2fadb1 100644
--- a/makefile
+++ b/makefile
@@ -40,7 +40,7 @@ OBJECTS = $(OBJ) hwstamp_ctl.o nsm.o phc2sys.o phc_ctl.o pmc.o pmc_agent.o \
SRC = $(OBJECTS:.o=.c)
DEPEND = $(OBJECTS:.o=.d)
srcdir := $(dir $(lastword $(MAKEFILE_LIST)))
-incdefs := $(shell CC="$(CC)" $(srcdir)/incdefs.sh)
+incdefs := $(shell CPP="$(CPP)" $(srcdir)/incdefs.sh)
version := $(shell $(srcdir)/version.sh $(srcdir))
VPATH = $(srcdir)