From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/813 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: compatability: dnsmasq--missing headers, capset Date: Thu, 10 May 2012 13:06:54 -0700 Message-ID: <20120510130654.363e32f2@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/VzSz3yWpc9tA5a2wlLgegIk" X-Trace: dough.gmane.org 1336680434 25752 80.91.229.3 (10 May 2012 20:07:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 10 May 2012 20:07:14 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-814-gllmg-musl=m.gmane.org@lists.openwall.com Thu May 10 22:07:12 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SSZdo-0000H7-4W for gllmg-musl@plane.gmane.org; Thu, 10 May 2012 22:07:12 +0200 Original-Received: (qmail 5396 invoked by uid 550); 10 May 2012 20:07:11 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5382 invoked from network); 10 May 2012 20:07:10 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=eXRNTazWTO/2I3x+siogODeR+XU4lVMYRKlb8EIHkVBpAuTe0yZNIfvm2xJjpj1sps/uppDEhr5Ob5H1yRIpFWreSLbaUwXslGBLYTMn5eyiMhBxVfUUKuWlQ3jSRrqrmErdtjMuPL+IXKZZZyuPP6cKrKft21HBHr6tFsWyvoc=; h=Date:From:To:Subject:Message-ID:X-Mailer:Mime-Version:Content-Type; X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:813 Archived-At: --MP_/VzSz3yWpc9tA5a2wlLgegIk Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I heard (on the Puppy Linux forums) that dnsmasq (http://www.thekelleys.org.uk/dnsmasq/) doesn't build with musl, so I checked. dnsmasq defines _GNU_SOURCE. 1. Needs netinet/in_systm.h Attached is one based on the version he provided. 2. Needs #define _PATH_LOG "/dev/log" This should be defined (at least for _GNU_SOURCE) when including syslog.h (glibc has it elsewhere but errors if it is directly included) Attached is a patch that will define it at the proper time (I also moved vsyslog out of the SYSLOG_NAMES guard, since glibc doesn't require that, and added _BSD_SOURCE because I was changing exactly that area anyhow) 3. After fixing the above, I get: musl-gcc -o dnsmasq cache.o rfc1035.o util.o option.o forward.o network.o dnsmasq.o dhcp.o lease.o rfc2131.o netlink.o dbus.o bpf.o helper.o tftp.o log.o conntrack.o dhcp6.o rfc3315.o dhcp-common.o outpacket.o radv.o slaac.o util.o: In function `sockaddr_isequal': util.c:(.text+0x8cd): undefined reference to `IN6_ARE_ADDR_EQUAL' network.o: In function `iface_check': network.c:(.text+0xfc9): undefined reference to `IN6_ARE_ADDR_EQUAL' dnsmasq.o: In function `main': dnsmasq.c:(.text+0x1285): undefined reference to `capget' dnsmasq.c:(.text+0x15d6): undefined reference to `capset' dnsmasq.c:(.text+0x1666): undefined reference to `capset' slaac.o: In function `slaac_ping_reply': slaac.c:(.text+0x109): undefined reference to `IN6_ARE_ADDR_EQUAL' slaac.o: In function `slaac_add_addrs': slaac.c:(.text+0x4a3): undefined reference to `IN6_ARE_ADDR_EQUAL' collect2: ld returned 1 exit status make[1]: *** [dnsmasq] Error 1 make[1]: Leaving directory `/home/ibid/misc/src/musl/dnsmasq/src' make: *** [all] Error 2 So dnsmasq needs capset & capget (which provide support for Linux capabilities). IN6_ARE_ADDR_EQUAL is a long macro from netinet/in.h in glibc. Reportedly it works if you patch them out, but that's an approach I'd avoid if at all possible because of the security implications. Isaac Dunham --MP_/VzSz3yWpc9tA5a2wlLgegIk Content-Type: text/x-chdr Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=in_systm.h #ifndef _NETINET_IN_SYSTM_H #define _NETINET_IN_SYSTM_H 1 #include typedef uint16_t n_short; typedef uint32_t n_long; typedef uint32_t n_time; #endif --MP_/VzSz3yWpc9tA5a2wlLgegIk Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=syslog.diff --- /opt/musl/include/syslog.h 2012-04-19 21:14:04.318606875 -0700 +++ /opt/musl/pincl/syslog.h 2012-05-10 12:48:02.155276564 -0700 @@ -59,7 +59,11 @@ int setlogmask (int); void syslog (int, const char *, ...); -#if defined(_GNU_SOURCE) && defined(SYSLOG_NAMES) +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define _PATH_LOG "/dev/log" +void vsyslog (int, const char *, va_list); + +#ifdef SYSLOG_NAMES #define __NEED_va_list #include #define INTERNAL_NOPRI 0x10 @@ -89,7 +93,7 @@ { "local2", LOG_LOCAL2 }, { "local3", LOG_LOCAL3 }, \ { "local4", LOG_LOCAL4 }, { "local5", LOG_LOCAL5 }, \ { "local6", LOG_LOCAL6 }, { "local7", LOG_LOCAL7 }, { NULL, -1 } }) -void vsyslog (int, const char *, va_list); +#endif #endif #ifdef __cplusplus --MP_/VzSz3yWpc9tA5a2wlLgegIk--