Просмотр исходного кода

sstp-client: fix musl compatibility

 - Ship a `net/ppp_defs.h` replacement header since musl does not provide one
   but `pppd/pppd.h` provided by pppd is needing it.
 - Add missing `sys/types.h` includes

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 9 лет назад
Родитель
Сommit
419637e17f
2 измененных файлов: 36 добавлений и 1 удалений
  1. 3
    1
      net/sstp-client/Makefile
  2. 33
    0
      net/sstp-client/patches/100-musl-compat.patch

+ 3
- 1
net/sstp-client/Makefile Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2014 OpenWrt.org
2
+# Copyright (C) 2006-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -18,6 +18,8 @@ PKG_LICENSE=GPLv2
18 18
 
19 19
 include $(INCLUDE_DIR)/package.mk
20 20
 
21
+TARGET_CPPFLAGS += -I$(PKG_BUILD_DIR)/include
22
+
21 23
 define Package/sstp-client
22 24
   SECTION:=net
23 25
   CATEGORY:=Network

+ 33
- 0
net/sstp-client/patches/100-musl-compat.patch Просмотреть файл

@@ -0,0 +1,33 @@
1
+--- /dev/null
2
++++ b/include/net/ppp_defs.h
3
+@@ -0,0 +1,10 @@
4
++#ifndef _NET_PPP_DEFS_H
5
++#define _NET_PPP_DEFS_H 1
6
++
7
++#define __need_time_t
8
++#include <time.h>
9
++
10
++#include <asm/types.h>
11
++#include <linux/ppp_defs.h>
12
++
13
++#endif /* net/ppp_defs.h */
14
+--- a/src/libsstp-log/sstp-log-syslog.c
15
++++ b/src/libsstp-log/sstp-log-syslog.c
16
+@@ -32,6 +32,7 @@
17
+ #include <sys/uio.h>
18
+ #include <sys/un.h>
19
+ #include <sys/socket.h>
20
++#include <sys/types.h>
21
+ #include <unistd.h>
22
+ 
23
+ #include <sstp-common.h>
24
+--- a/src/libsstp-log/sstp-log-std.c
25
++++ b/src/libsstp-log/sstp-log-std.c
26
+@@ -25,6 +25,7 @@
27
+ #include <stdio.h>
28
+ #include <stdint.h>
29
+ #include <string.h>
30
++#include <sys/types.h>
31
+ #include <sys/uio.h>
32
+ #include <unistd.h>
33
+