Re: Error building 8.1.9 for Smoothwall Express
Ed W
Tue Jun 16 16:06:09 2020
Hi, the root issue here is this line:
https://github.com/rsmarples/dhcpcd/blob/709e6b1a38ef87ada75354e968a9b35eca3131aa/src/common.h#L75
This prevents versions 8.x & 9.x compiling in uclibc-ng for example
I've submitted a patch upstream to uclibc-ng that seems accepted for
release ucblibc-ng-1.0.34, however, simply commenting out the #include
also works for me...
Up to you how you carry this forward? I guess it's useful to have older
linux's work ok, but you might also consider renaming your "__unused"
macro since that's what is tickling it? (the macro renames struct
members in other .h files, triggering the compile error)
Thanks!
Ed W
On 10/06/2020 06:18, Roy Marples wrote:
Hi Neal
On 09/06/2020 23:19, Neal P. Murphy wrote:
Found and patched. Problem was introduced in 8.1.7. In if.c, I moved
line 58 (include fcntl.h) to after line 33. It builds now. Testing
will show if anything broke.
N
Just to confirm, this patch fixes it for you?
Roy
diff --git a/src/if.c b/src/if.c
index c9327384..9e158a9c 100644
--- a/src/if.c
+++ b/src/if.c
@@ -31,6 +31,8 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <fcntl.h> /* Needs to be here for old Linux */
+
#include "config.h"
#include <net/if.h>
@@ -54,7 +56,6 @@
#include <errno.h>
#include <ifaddrs.h>
#include <inttypes.h>
-#include <fcntl.h>
#include <fnmatch.h>
#include <stddef.h>
#include <stdio.h>
Archive administrator: postmaster@marples.name