diff options
author | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-04-05 21:50:31 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-04-15 22:05:38 +0200 |
commit | 1b31b50ef4088deeee07574e0c19de7fc207a132 (patch) | |
tree | bde6ed5665a756bac0b1483213150d825878df80 /package/libselinux/0001-fix-musl-build.patch | |
parent | ab6d421c58ed9aac610f5d246946c66cd3f2c08d (diff) | |
download | buildroot-1b31b50ef4088deeee07574e0c19de7fc207a132.tar.gz buildroot-1b31b50ef4088deeee07574e0c19de7fc207a132.zip |
libselinux: remove Blackfin patch
And renumber the remaining patches.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/libselinux/0001-fix-musl-build.patch')
-rw-r--r-- | package/libselinux/0001-fix-musl-build.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/package/libselinux/0001-fix-musl-build.patch b/package/libselinux/0001-fix-musl-build.patch new file mode 100644 index 0000000000..7af3a3c36f --- /dev/null +++ b/package/libselinux/0001-fix-musl-build.patch @@ -0,0 +1,30 @@ +fix undefined macros in musl + +musl does not define glibc-specific macros, so use a simple version of +the macro when it is not defined. + +This is very inefficient, however, but copying the code from glibc is +not really possible because it is LGPL while libselinux in Public +Domain, and we want to avoid license propagation, so this macro is +completely written from scratch, and non-optimal. + +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> + +diff -durN libselinux-2.1.13.orig/src/booleans.c libselinux-2.1.13/src/booleans.c +--- libselinux-2.1.13.orig/src/booleans.c 2013-02-06 02:43:22.000000000 +0100 ++++ libselinux-2.1.13/src/booleans.c 2015-07-26 20:40:41.311801914 +0200 +@@ -62,6 +62,14 @@ + goto bad; + } + ++/* Simple (but inefficient) version of _D_ALLOC_NAMLEN when ++ * building with a C library that misses it (e.g. musl). ++ * Note: glibc does a strlen on (d)->d_name, so assume it is safe. ++ */ ++#ifndef _D_ALLOC_NAMLEN ++#define _D_ALLOC_NAMLEN(d) (strlen((d)->d_name)+1) ++#endif ++ + for (i = 0; i < *len; i++) { + n[i] = (char *)malloc(_D_ALLOC_NAMLEN(namelist[i])); + if (!n[i]) { |