dhcpcd: unbreak musl build.

This commit is contained in:
Juan RP 2014-11-10 16:25:02 +01:00
parent f80eb6488b
commit 7ad9731ad9
2 changed files with 143 additions and 1 deletions

View file

@ -0,0 +1,142 @@
Patch for musl:
- no sys/queue.h, use compat/queue.h by including config.h
- do not include sys/cdefs.h, include it only for linux if __GLIBC__ is defined.
--- compat/queue.h.orig 2014-11-10 15:54:07.744929227 +0100
+++ compat/queue.h 2014-11-10 15:54:14.071992172 +0100
@@ -34,7 +34,6 @@
#ifndef COMPAT_QUEUE_H
#define COMPAT_QUEUE_H
-#include <sys/queue.h>
/*
* Tail queue definitions.
*/
--- ipv6nd.h.orig 2014-11-10 16:06:24.642349623 +0100
+++ ipv6nd.h 2014-11-10 16:07:35.347079022 +0100
@@ -28,10 +28,9 @@
#ifndef IPV6ND_H
#define IPV6ND_H
-#include <sys/queue.h>
-
#include <time.h>
+#include "config.h"
#include "dhcpcd.h"
#include "ipv6.h"
--- ipv6.h.orig 2014-11-10 16:08:03.514369511 +0100
+++ ipv6.h 2014-11-10 16:08:27.211613861 +0100
@@ -28,7 +28,6 @@
#ifndef IPV6_H
#define IPV6_H
-#include <sys/queue.h>
#include <sys/uio.h>
#include <netinet/in.h>
@@ -38,6 +37,7 @@
# include <linux/ipv6.h>
#endif
+#include "config.h"
#include "dhcpcd.h"
#define ALLROUTERS "ff02::2"
--- ipv4.c.orig 2014-11-10 16:08:42.210768503 +0100
+++ ipv4.c 2014-11-10 16:08:49.946848257 +0100
@@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
-#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/types.h>
--- if-options.c.orig 2014-11-10 16:09:05.972013455 +0100
+++ if-options.c 2014-11-10 16:09:11.684072335 +0100
@@ -29,7 +29,6 @@
#include <sys/param.h>
#include <sys/types.h>
-#include <sys/queue.h>
#include <arpa/inet.h>
--- eloop.c.orig 2014-11-10 16:09:31.579277397 +0100
+++ eloop.c 2014-11-10 16:09:41.386378472 +0100
@@ -28,7 +28,6 @@
/* Needed for ppoll(2) */
#define _GNU_SOURCE
-#include <sys/queue.h>
#include <sys/time.h>
#include <errno.h>
@@ -38,6 +37,7 @@
#include <stdlib.h>
#include <syslog.h>
+#include "config.h"
#include "common.h"
#include "dhcpcd.h"
#include "eloop.h"
--- dhcpcd.h.orig 2014-11-10 16:10:00.467575110 +0100
+++ dhcpcd.h 2014-11-10 16:10:09.882672127 +0100
@@ -28,10 +28,10 @@
#ifndef DHCPCD_H
#define DHCPCD_H
-#include <sys/queue.h>
#include <sys/socket.h>
#include <net/if.h>
+#include "config.h"
#include "defs.h"
#include "control.h"
#include "if-options.h"
--- dhcpcd.c.orig 2014-11-10 16:10:26.435842686 +0100
+++ dhcpcd.c 2014-11-10 16:10:32.467904833 +0100
@@ -30,7 +30,6 @@ const char dhcpcd_copyright[] = "Copyrig
#define _WITH_DPRINTF /* Stop FreeBSD bitching */
#include <sys/file.h>
-#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
--- auth.h.orig 2014-11-10 16:10:49.572081045 +0100
+++ auth.h 2014-11-10 16:11:07.123261845 +0100
@@ -28,7 +28,7 @@
#ifndef AUTH_H
#define AUTH_H
-#include <sys/queue.h>
+#include "config.h"
#define DHCPCD_AUTH_SEND (1 << 0)
#define DHCPCD_AUTH_REQUIRE (1 << 1)
--- auth.c.orig 2014-11-10 16:11:28.427481277 +0100
+++ auth.c 2014-11-10 16:11:33.107529478 +0100
@@ -26,7 +26,6 @@
*/
#include <sys/file.h>
-#include <sys/queue.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
--- common.c.orig 2014-11-10 16:12:10.283912320 +0100
+++ common.c 2014-11-10 16:21:45.141810097 +0100
@@ -31,7 +31,9 @@
#endif
#ifndef __sun
+# if !defined(__linux__) || (defined(__linux) && defined(__GLIBC__))
# include <sys/cdefs.h>
+# endif
#endif
#ifdef __APPLE__

View file

@ -1,7 +1,7 @@
# Template file for 'dhcpcd'
pkgname=dhcpcd
version=6.6.1
revision=1
revision=2
lib32disabled=yes
build_options="systemd"
build_style=configure