* [PATCH 1/2] compat.h: add more RTNLGRP_ macros
@ 2016-01-04 11:06 Jiri Slaby
2016-01-04 11:06 ` [PATCH 2/2] Makefile: fix build with older glibc Jiri Slaby
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2016-01-04 11:06 UTC (permalink / raw)
To: davej; +Cc: trinity, Jiri Slaby
Some more RTNLGRP macros are not defined on SLE11 yet. So define them
in compat.h.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
include/compat.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/compat.h b/include/compat.h
index fda51b529b4d..2705b93534a3 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -268,6 +268,18 @@ enum {
#ifndef NETLINK_SOCK_DIAG
#define NETLINK_SOCK_DIAG 4
#endif
+#ifndef RTNLGRP_DCB
+#define RTNLGRP_DCB 23
+#endif
+#ifndef RTNLGRP_IPV4_NETCONF
+#define RTNLGRP_IPV4_NETCONF 24
+#endif
+#ifndef RTNLGRP_IPV6_NETCONF
+#define RTNLGRP_IPV6_NETCONF 25
+#endif
+#ifndef RTNLGRP_MDB
+#define RTNLGRP_MDB 26
+#endif
#ifndef RTNLGRP_MPLS_ROUTE
#define RTNLGRP_MPLS_ROUTE 27
#endif
--
2.6.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] Makefile: fix build with older glibc
2016-01-04 11:06 [PATCH 1/2] compat.h: add more RTNLGRP_ macros Jiri Slaby
@ 2016-01-04 11:06 ` Jiri Slaby
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Slaby @ 2016-01-04 11:06 UTC (permalink / raw)
To: davej; +Cc: trinity, Jiri Slaby
man 2 clock_gettime says:
Link with -lrt (only for glibc versions before 2.17).
If we do not do that, we get:
post-mortem.c:61: undefined reference to `clock_gettime'
syscall.o: In function `__do_syscall':
syscall.c:121: undefined reference to `clock_gettime'
watchdog.o: In function `is_child_making_progress':
watchdog.c:317: undefined reference to `clock_gettime'
So introduce (standard) LDLIBS into Makefile and add -lrt there.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 0cdcf4be0ae0..a70c5bd958a5 100644
--- a/Makefile
+++ b/Makefile
@@ -37,6 +37,9 @@ CFLAGS += -Wstrict-prototypes -Wmissing-prototypes
# needed for show_backtrace() to work correctly.
LDFLAGS += -rdynamic
+# glibc versions before 2.17 for clock_gettime
+LDLIBS += -lrt
+
# gcc only.
ifneq ($(shell $(CC) -v 2>&1 | grep -c "clang"), 1)
CFLAGS += -Wlogical-op
@@ -96,7 +99,7 @@ DEPDIR= .deps
-include $(SRCS:%.c=$(DEPDIR)/%.d)
trinity: version test $(OBJS) $(HEADERS)
- $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o trinity $(OBJS)
+ $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o trinity $(OBJS) $(LDLIBS)
@mkdir -p tmp
df = $(DEPDIR)/$(*D)/$(*F)
--
2.6.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-04 11:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 11:06 [PATCH 1/2] compat.h: add more RTNLGRP_ macros Jiri Slaby
2016-01-04 11:06 ` [PATCH 2/2] Makefile: fix build with older glibc Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).