summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-07-20 03:35:26 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-08 16:38:20 -0400
commit0f57a51209586a2d5277d3a9ca0aac34a4eb228f (patch)
treec3e25f6cc6dffcbed223b6f89240ac71515955ea
parent48bce13c9b47ddd149f690b81606248dc6c47fc4 (diff)
downloadmeta-openembedded-0f57a51209586a2d5277d3a9ca0aac34a4eb228f.tar.gz
ippool: Fix build errors found with hardening flags
Fix build with musl Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch56
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch28
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch30
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch283
-rw-r--r--meta-networking/recipes-daemons/ippool/ippool_1.3.bb31
5 files changed, 415 insertions, 13 deletions
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
new file mode 100644
index 000000000..e96762125
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0001-Respect-flags-from-env.patch
@@ -0,0 +1,56 @@
1From 4848b9e4d516a9203c08432901a7b40419e8f43c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Jul 2017 15:54:35 -0700
4Subject: [PATCH 1/3] Respect flags from env
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 Makefile | 4 ++--
9 cli/Makefile | 2 +-
10 pppd/Makefile | 2 +-
11 3 files changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index a05a000..439a978 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -81,8 +81,8 @@ LIBS.dmalloc= -ldmalloc
18 export USE_DMALLOC
19 endif
20
21-CPPFLAGS= $(CPPFLAGS.ippooltest)
22-CFLAGS= -I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
23+CPPFLAGS+= $(CPPFLAGS.ippooltest)
24+CFLAGS+= -I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
25 LDFLAGS.ippoold= $(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
26 LDFLAGS.ippoolconfig= $(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
27
28diff --git a/cli/Makefile b/cli/Makefile
29index 4b5dd59..56fbf2f 100644
30--- a/cli/Makefile
31+++ b/cli/Makefile
32@@ -7,7 +7,7 @@ CLI_SRCS_TEST.o= $(CLI_SRCS_TEST.c:%.c=%.o)
33
34 LDFLAGS.cli_test= -L.. -L. $(READLINE_LDFLAGS) -lcli -lusl -lreadline -lcurses -lc
35
36-CFLAGS= $(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS)
37+CFLAGS= $(CFLAGS.optimize) -MMD -Wall -Werror -I.. $(READLINE_CFLAGS) $(CPPFLAGS)
38
39 .PHONY: all test clean
40
41diff --git a/pppd/Makefile b/pppd/Makefile
42index 106deca..7fd815f 100644
43--- a/pppd/Makefile
44+++ b/pppd/Makefile
45@@ -10,7 +10,7 @@ endif
46
47 # END CONFIGURABLE SETTINGS
48
49-CFLAGS += -g -I.. -I/usr/include/pppd $(CFLAGS.pppd) -fPIC
50+CFLAGS += -g -I.. -I=/usr/include/pppd $(CFLAGS.pppd) -fPIC
51 LDFLAGS += -shared
52
53 all: ippool.so
54--
552.13.3
56
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
new file mode 100644
index 000000000..6fb7cc5c4
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
@@ -0,0 +1,28 @@
1From 5d7f20c045b3c74dad2c53d65e30bd4840250082 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 27 Jun 2017 15:17:19 -0700
4Subject: [PATCH] usl_timer: Check for return value of write() API
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 usl/usl_timer.c | 4 +++-
9 1 file changed, 3 insertions(+), 1 deletion(-)
10
11diff --git a/usl/usl_timer.c b/usl/usl_timer.c
12index fda752b..d8414a6 100644
13--- a/usl/usl_timer.c
14+++ b/usl/usl_timer.c
15@@ -94,7 +94,9 @@ void usl_timer_tick(void)
16
17 if (!usl_tick_pending) {
18 usl_tick_pending = 1;
19- write(usl_tick_pipe[1], &msg, sizeof(msg));
20+ if (write(usl_tick_pipe[1], &msg, sizeof(msg)) != sizeof(msg)) {
21+ fprintf(stderr, "write to fd %i failed: %s\n", usl_tick_pipe[1], strerror(errno));
22+ }
23 }
24 }
25
26--
272.13.2
28
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch b/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
new file mode 100644
index 000000000..d80f7b436
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0002-link-with-libtirpc.patch
@@ -0,0 +1,30 @@
1From 47aef26198431f7ad568c2277dded158bda3e36f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Jul 2017 16:00:35 -0700
4Subject: [PATCH 2/3] link with libtirpc
5
6musl needs it
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 Makefile | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/Makefile b/Makefile
14index 439a978..ea821eb 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -83,8 +83,8 @@ endif
18
19 CPPFLAGS+= $(CPPFLAGS.ippooltest)
20 CFLAGS+= -I. -Iusl -Icli -MMD -Wall -g $(CPPFLAGS) $(CPPFLAGS.dmalloc)
21-LDFLAGS.ippoold= $(LDFLAGS) -Wl,-E -L. -Lusl -lusl -lnsl -ldl $(LIBS.dmalloc) -lc
22-LDFLAGS.ippoolconfig= $(LDFLAGS) -Lcli -lcli -lreadline -lcurses -lnsl $(LIBS.dmalloc) -lc
23+LDFLAGS.ippoold= $(LDFLAGS) -Wl,-E -L. -Lusl -lusl -ldl $(LIBS.dmalloc) -lc -ltirpc
24+LDFLAGS.ippoolconfig= $(LDFLAGS) -Lcli -lcli -lreadline -lcurses $(LIBS.dmalloc) -lc -ltirpc
25
26 OPT_CFLAGS?= -O
27
28--
292.13.3
30
diff --git a/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
new file mode 100644
index 000000000..3cd5259fa
--- /dev/null
+++ b/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch
@@ -0,0 +1,283 @@
1From eb345047decba665e3f39908336a83f039e1ece2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 Jul 2017 16:01:32 -0700
4Subject: [PATCH 3/3] musl fixes
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 cli/cli_readline.c | 7 +-
9 ippool_api.c | 9 ++-
10 net/ppp_defs.h | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++
11 usl/usl.h | 4 ++
12 4 files changed, 208 insertions(+), 6 deletions(-)
13 create mode 100644 net/ppp_defs.h
14
15diff --git a/cli/cli_readline.c b/cli/cli_readline.c
16index 2812e6e..542935c 100644
17--- a/cli/cli_readline.c
18+++ b/cli/cli_readline.c
19@@ -17,13 +17,14 @@
20 * Boston, MA 02110-1301 USA
21 *
22 *****************************************************************************/
23-
24+#define _GNU_SOURCE
25 #include <stdio.h>
26 #include <unistd.h>
27 #include <sys/types.h>
28 #include <sys/file.h>
29 #include <sys/stat.h>
30-#include <sys/errno.h>
31+#include <fcntl.h>
32+#include <errno.h>
33 #include <signal.h>
34
35 #include <readline/readline.h>
36@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_handlers(void)
37
38 static int cli_rl_install_signal_handlers(void)
39 {
40- __sighandler_t handler;
41+ sighandler_t handler;
42
43 rl_catch_signals = 0;
44 rl_clear_signals();
45diff --git a/ippool_api.c b/ippool_api.c
46index 2c10c47..d1127a9 100644
47--- a/ippool_api.c
48+++ b/ippool_api.c
49@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT *xprt)
50 * non-loopback interface, reject the request.
51 */
52 if ((!ippool_opt_remote_rpc) &&
53- ((xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) &&
54- (xprt->xp_raddr.sin_addr.s_addr != htonl(INADDR_ANY)))) {
55+ ((xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_LOOPBACK)) &&
56+ (xprt->xp_raddr.sin6_addr.s6_addr != htonl(INADDR_ANY)))) {
57+ char straddr[INET6_ADDRSTRLEN];
58+ inet_ntop(AF_INET6, &xprt->xp_raddr.sin6_addr, straddr, sizeof(straddr));
59+
60 if (ippool_opt_debug) {
61- ippool_log(LOG_ERR, "Rejecting RPC request from %s", inet_ntoa(xprt->xp_raddr.sin_addr));
62+ ippool_log(LOG_ERR, "Rejecting RPC request from %s", straddr);
63 }
64 svcerr_auth(xprt, AUTH_TOOWEAK);
65 return -EPERM;
66diff --git a/net/ppp_defs.h b/net/ppp_defs.h
67new file mode 100644
68index 0000000..b06eda5
69--- /dev/null
70+++ b/net/ppp_defs.h
71@@ -0,0 +1,194 @@
72+/* $Id: ppp_defs.h,v 1.17 2002/12/06 09:49:15 paulus Exp $ */
73+
74+/*
75+ * ppp_defs.h - PPP definitions.
76+ *
77+ * Copyright (c) 1984 Paul Mackerras. All rights reserved.
78+ *
79+ * Redistribution and use in source and binary forms, with or without
80+ * modification, are permitted provided that the following conditions
81+ * are met:
82+ *
83+ * 1. Redistributions of source code must retain the above copyright
84+ * notice, this list of conditions and the following disclaimer.
85+ *
86+ * 2. Redistributions in binary form must reproduce the above copyright
87+ * notice, this list of conditions and the following disclaimer in
88+ * the documentation and/or other materials provided with the
89+ * distribution.
90+ *
91+ * 3. The name(s) of the authors of this software must not be used to
92+ * endorse or promote products derived from this software without
93+ * prior written permission.
94+ *
95+ * 4. Redistributions of any form whatsoever must retain the following
96+ * acknowledgment:
97+ * "This product includes software developed by Paul Mackerras
98+ * <paulus@samba.org>".
99+ *
100+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
101+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
102+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
103+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
104+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
105+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
106+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
107+ */
108+
109+#ifndef _PPP_DEFS_H_
110+#define _PPP_DEFS_H_
111+
112+/*
113+ * The basic PPP frame.
114+ */
115+#define PPP_HDRLEN 4 /* octets for standard ppp header */
116+#define PPP_FCSLEN 2 /* octets for FCS */
117+
118+/*
119+ * Packet sizes
120+ *
121+ * Note - lcp shouldn't be allowed to negotiate stuff outside these
122+ * limits. See lcp.h in the pppd directory.
123+ * (XXX - these constants should simply be shared by lcp.c instead
124+ * of living in lcp.h)
125+ */
126+#define PPP_MTU 1500 /* Default MTU (size of Info field) */
127+#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN)
128+#define PPP_MINMTU 64
129+#define PPP_MRU 1500 /* default MRU = max length of info field */
130+#define PPP_MAXMRU 65000 /* Largest MRU we allow */
131+#define PPP_MINMRU 128
132+
133+#define PPP_ADDRESS(p) (((u_char *)(p))[0])
134+#define PPP_CONTROL(p) (((u_char *)(p))[1])
135+#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3])
136+
137+/*
138+ * Significant octet values.
139+ */
140+#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
141+#define PPP_UI 0x03 /* Unnumbered Information */
142+#define PPP_FLAG 0x7e /* Flag Sequence */
143+#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */
144+#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */
145+
146+/*
147+ * Protocol field values.
148+ */
149+#define PPP_IP 0x21 /* Internet Protocol */
150+#define PPP_AT 0x29 /* AppleTalk Protocol */
151+#define PPP_IPX 0x2b /* IPX protocol */
152+#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */
153+#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */
154+#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */
155+#define PPP_COMP 0xfd /* compressed packet */
156+#define PPP_IPCP 0x8021 /* IP Control Protocol */
157+#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */
158+#define PPP_IPXCP 0x802b /* IPX Control Protocol */
159+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */
160+#define PPP_CCP 0x80fd /* Compression Control Protocol */
161+#define PPP_ECP 0x8053 /* Encryption Control Protocol */
162+#define PPP_LCP 0xc021 /* Link Control Protocol */
163+#define PPP_PAP 0xc023 /* Password Authentication Protocol */
164+#define PPP_LQR 0xc025 /* Link Quality Report protocol */
165+#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */
166+#define PPP_CBCP 0xc029 /* Callback Control Protocol */
167+#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */
168+
169+/*
170+ * Values for FCS calculations.
171+ */
172+#define PPP_INITFCS 0xffff /* Initial FCS value */
173+#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */
174+#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff])
175+
176+/*
177+ * A 32-bit unsigned integral type.
178+ */
179+
180+#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \
181+ && !defined(__FreeBSD__) && (NS_TARGET < 40)
182+#ifdef UINT32_T
183+typedef UINT32_T u_int32_t;
184+#else
185+typedef unsigned int u_int32_t;
186+typedef unsigned short u_int16_t;
187+#endif
188+#endif
189+
190+/*
191+ * Extended asyncmap - allows any character to be escaped.
192+ */
193+typedef u_int32_t ext_accm[8];
194+
195+/*
196+ * What to do with network protocol (NP) packets.
197+ */
198+enum NPmode {
199+ NPMODE_PASS, /* pass the packet through */
200+ NPMODE_DROP, /* silently drop the packet */
201+ NPMODE_ERROR, /* return an error */
202+ NPMODE_QUEUE /* save it up for later. */
203+};
204+
205+/*
206+ * Statistics.
207+ */
208+struct pppstat {
209+ unsigned int ppp_ibytes; /* bytes received */
210+ unsigned int ppp_ipackets; /* packets received */
211+ unsigned int ppp_ierrors; /* receive errors */
212+ unsigned int ppp_obytes; /* bytes sent */
213+ unsigned int ppp_opackets; /* packets sent */
214+ unsigned int ppp_oerrors; /* transmit errors */
215+};
216+
217+struct vjstat {
218+ unsigned int vjs_packets; /* outbound packets */
219+ unsigned int vjs_compressed; /* outbound compressed packets */
220+ unsigned int vjs_searches; /* searches for connection state */
221+ unsigned int vjs_misses; /* times couldn't find conn. state */
222+ unsigned int vjs_uncompressedin; /* inbound uncompressed packets */
223+ unsigned int vjs_compressedin; /* inbound compressed packets */
224+ unsigned int vjs_errorin; /* inbound unknown type packets */
225+ unsigned int vjs_tossed; /* inbound packets tossed because of error */
226+};
227+
228+struct ppp_stats {
229+ struct pppstat p; /* basic PPP statistics */
230+ struct vjstat vj; /* VJ header compression statistics */
231+};
232+
233+struct compstat {
234+ unsigned int unc_bytes; /* total uncompressed bytes */
235+ unsigned int unc_packets; /* total uncompressed packets */
236+ unsigned int comp_bytes; /* compressed bytes */
237+ unsigned int comp_packets; /* compressed packets */
238+ unsigned int inc_bytes; /* incompressible bytes */
239+ unsigned int inc_packets; /* incompressible packets */
240+ unsigned int ratio; /* recent compression ratio << 8 */
241+};
242+
243+struct ppp_comp_stats {
244+ struct compstat c; /* packet compression statistics */
245+ struct compstat d; /* packet decompression statistics */
246+};
247+
248+/*
249+ * The following structure records the time in seconds since
250+ * the last NP packet was sent or received.
251+ */
252+struct ppp_idle {
253+ time_t xmit_idle; /* time since last NP packet sent */
254+ time_t recv_idle; /* time since last NP packet received */
255+};
256+
257+#ifndef __P
258+#ifdef __STDC__
259+#define __P(x) x
260+#else
261+#define __P(x) ()
262+#endif
263+#endif
264+
265+#endif /* _PPP_DEFS_H_ */
266diff --git a/usl/usl.h b/usl/usl.h
267index cdc16db..88d2714 100644
268--- a/usl/usl.h
269+++ b/usl/usl.h
270@@ -38,6 +38,10 @@
271 #include "usl_fsm.h"
272 #include "usl_list.h"
273
274+#ifndef WAIT_ANY
275+#define WAIT_ANY (-1)
276+#endif
277+
278 #define USL_VERSION "0.6"
279
280 #ifdef DEBUG
281--
2822.13.3
283
diff --git a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
index 969f434cc..05921d536 100644
--- a/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
+++ b/meta-networking/recipes-daemons/ippool/ippool_1.3.bb
@@ -11,16 +11,21 @@ HOMEPAGE = "http://www.openl2tp.org/"
11SECTION = "console/network" 11SECTION = "console/network"
12LICENSE = "GPLv2+" 12LICENSE = "GPLv2+"
13 13
14SRC_URI = "\ 14SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
15 https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ 15 file://runtest.sh \
16 file://ippool_usl_timer.patch \ 16 file://ippool.service \
17 file://ippool_parallel_make_and_pic.patch \ 17 file://ippool_usl_timer.patch \
18 file://ippool_init.d.patch \ 18 file://ippool_parallel_make_and_pic.patch \
19 file://always_syslog.patch \ 19 file://ippool_init.d.patch \
20 file://makefile-add-ldflags.patch \ 20 file://always_syslog.patch \
21 file://runtest.sh \ 21 file://makefile-add-ldflags.patch \
22 file://ippool.service \ 22 file://0001-usl_timer-Check-for-return-value-of-write-API.patch \
23 " 23 file://0001-Respect-flags-from-env.patch \
24"
25SRC_URI_append_libc-musl = "\
26 file://0002-link-with-libtirpc.patch \
27 file://0003-musl-fixes.patch \
28 "
24 29
25LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f" 30LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
26SRC_URI[md5sum] = "e2401e65db26a3764585b97212888fae" 31SRC_URI[md5sum] = "e2401e65db26a3764585b97212888fae"
@@ -29,6 +34,7 @@ SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea3144
29inherit systemd 34inherit systemd
30 35
31DEPENDS = "readline ppp ncurses gzip-native" 36DEPENDS = "readline ppp ncurses gzip-native"
37DEPENDS_append_libc-musl = " libtirpc"
32RDEPENDS_${PN} = "rpcbind" 38RDEPENDS_${PN} = "rpcbind"
33 39
34EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" 40EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'"
@@ -36,6 +42,8 @@ EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}"
36# enable self tests 42# enable self tests
37EXTRA_OEMAKE += "IPPOOL_TEST=y" 43EXTRA_OEMAKE += "IPPOOL_TEST=y"
38 44
45CPPFLAGS += "${SELECTED_OPTIMIZATION}"
46CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
39 47
40SYSTEMD_SERVICE_${PN} = "ippool.service" 48SYSTEMD_SERVICE_${PN} = "ippool.service"
41SYSTEMD_AUTO_ENABLE = "disable" 49SYSTEMD_AUTO_ENABLE = "disable"
@@ -48,9 +56,6 @@ do_compile_prepend() {
48 56
49 sed -i -e "s:-I/usr/include/pppd:-I=/usr/include/pppd:" ${S}/pppd/Makefile 57 sed -i -e "s:-I/usr/include/pppd:-I=/usr/include/pppd:" ${S}/pppd/Makefile
50 58
51 # ignore the OPT_CFLAGS?= in Makefile,
52 # it should be in CFLAGS from env
53 export OPT_CFLAGS=
54} 59}
55 60
56 61