diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-08-10 13:12:32 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-08-10 15:26:41 -0700 |
commit | 286e42b3f4c967c6da0200dbc0154cb161ae2fdf (patch) | |
tree | 7dcb2d234ad6462244483fa8ca42b23da9920395 /net/chaosvpn/patches | |
parent | 11c4323665df0e4d03ce2d843f0a52401f0e0a8e (diff) |
chaosvpn: fix compilation without sys/cdefs
sys/cdefs.h does not come included with musl. It's also deprecated.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'net/chaosvpn/patches')
-rw-r--r-- | net/chaosvpn/patches/020-cdefs.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/net/chaosvpn/patches/020-cdefs.patch b/net/chaosvpn/patches/020-cdefs.patch new file mode 100644 index 000000000..5ea6949b3 --- /dev/null +++ b/net/chaosvpn/patches/020-cdefs.patch @@ -0,0 +1,32 @@ +--- a/ar.h ++++ b/ar.h +@@ -20,8 +20,6 @@ + #ifndef _AR_H + #define _AR_H 1 + +-#include <sys/cdefs.h> +- + /* Archive files start with the ARMAG identifying string. Then follows a + `struct ar_hdr', and as many bytes of member file data as its `ar_size' + member indicates, for each member file. */ +@@ -31,7 +29,9 @@ + + #define ARFMAG "`\n" /* String in ar_fmag at end of each header. */ + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + struct ar_hdr + { +@@ -43,6 +43,8 @@ struct ar_hdr + char ar_fmag[2]; /* Always contains ARFMAG. */ + }; + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* ar.h */ |