Re: [PATCH] systemd-dhcp: fix build with Linux <= 3.2.0 headers



Hi there,

Fixes build on Ubuntu 12.04.

src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-network.c: In function '_bind_raw_socket':
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-network.c:79:17: error: 'BPF_XOR' undeclared 
(first use in this function)
src/dhcp-manager/systemd-dhcp/src/libsystemd-network/dhcp-network.c:79:17: note: each undeclared identifier 
is reported only once for each function it appears in
make[4]: *** [libsystemd_nm_la-dhcp-network.lo] Error 1

Signed-off-by: Petr Vorel <petr vorel gmail com>
---
 src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h b/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h
index 6d500f4..f8856a1 100644
--- a/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h
+++ b/src/dhcp-manager/systemd-dhcp/nm-sd-adapt.h
@@ -38,6 +38,11 @@

 #include "nm-logging.h"

+/* Missing in Linux 3.2.0, in Ubuntu 12.04 */
+#ifndef BPF_XOR
+#define BPF_XOR 0xa0
+#endif
+
 static inline guint32
 _slog_level_to_nm (int slevel)
 {

Please push this patch to branch nm-1-0. It's a build fix created by Lubomir Rintel,
pushed to master as 3811a683.

Kind regards,
Petr


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]