diff --git a/srcpkgs/libbsd/patches/musl-a_out_h.patch b/srcpkgs/libbsd/patches/musl-a_out_h.patch new file mode 100644 index 0000000000..d6f5eebccf --- /dev/null +++ b/srcpkgs/libbsd/patches/musl-a_out_h.patch @@ -0,0 +1,67 @@ +--- include/bsd/nlist.h 2013-10-10 08:14:26.000000000 +0200 ++++ include/bsd/nlist.h 2015-10-31 14:32:06.038427778 +0100 +@@ -28,7 +28,53 @@ + #define LIBBSD_NLIST_H + + #include ++#if defined(__GLIBC__) + #include ++#else ++/* Just the bare necessities for musl libc */ ++struct exec ++{ ++ unsigned long a_info; /* Use macros N_MAGIC, etc for access. */ ++ unsigned int a_text; /* Length of text, in bytes. */ ++ unsigned int a_data; /* Length of data, in bytes. */ ++ unsigned int a_bss; /* Length of uninitialized data area for file, in bytes. */ ++ unsigned int a_syms; /* Length of symbol table data in file, in bytes. */ ++ unsigned int a_entry; /* Start address. */ ++ unsigned int a_trsize;/* Length of relocation info for text, in bytes. */ ++ unsigned int a_drsize;/* Length of relocation info for data, in bytes. */ ++}; ++ ++struct nlist ++{ ++ union ++ { ++ char *n_name; ++ struct nlist *n_next; ++ long n_strx; ++ } n_un; ++ unsigned char n_type; ++ char n_other; ++ short n_desc; ++ unsigned long n_value; ++}; ++ ++#define N_UNDF 0 ++#define N_ABS 2 ++#define N_TEXT 4 ++#define N_DATA 6 ++#define N_BSS 8 ++#define N_FN 15 ++#define N_EXT 1 ++#define N_TYPE 036 ++#define N_STAB 0340 ++#define N_INDR 0xa ++#define N_SETA 0x14 /* Absolute set element symbol. */ ++#define N_SETT 0x16 /* Text set element symbol. */ ++#define N_SETD 0x18 /* Data set element symbol. */ ++#define N_SETB 0x1A /* Bss set element symbol. */ ++#define N_SETV 0x1C /* Pointer to set vector in data area. */ ++ ++#endif /* !defined(__GLIBC__) */ + + __BEGIN_DECLS + extern int nlist(const char *filename, struct nlist *list); +--- src/nlist.c 2015-10-31 14:36:20.857402580 +0100 ++++ src/nlist.c 2015-10-31 14:24:23.407473525 +0100 +@@ -40,7 +40,7 @@ + #include + + #include +-#include ++#include "nlist.h" + #include + #include + #include diff --git a/srcpkgs/libbsd/template b/srcpkgs/libbsd/template index 610beb97ee..dc1868b4c1 100644 --- a/srcpkgs/libbsd/template +++ b/srcpkgs/libbsd/template @@ -1,7 +1,7 @@ # Template file for 'libbsd' pkgname=libbsd version=0.7.0 -revision=2 +revision=3 build_style=gnu-configure short_desc="Provides useful functions commonly found on BSD system" maintainer="Juan RP " @@ -15,7 +15,6 @@ post_extract() { *-musl) sed -i '1i#include ' src/flopen.c src/nlist.c sed -i '/#error/d' src/funopen.c - sed -i 's,,,g' src/nlist.c ;; esac }