aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-08-09 09:08:20 -0700
committerAndrei Gherzan <andrei@gherzan.ro>2015-08-09 23:02:30 +0200
commitf188f3d756f59fb4dc64cc1a64263c2251f76ae5 (patch)
treef6861146df284592354eabeb352bb0d4fad04c57
parent7457bf182c8fd550ec877ecd786a3edd16e65495 (diff)
downloadmeta-raspberrypi-f188f3d756f59fb4dc64cc1a64263c2251f76ae5.tar.gz
meta-raspberrypi-f188f3d756f59fb4dc64cc1a64263c2251f76ae5.tar.bz2
meta-raspberrypi-f188f3d756f59fb4dc64cc1a64263c2251f76ae5.zip
userland: Fix POSIX compliance expectation
We have errors like below with glibc 2.22+ net_sockets_common.c:139:20: error: storage size of 'hints' isn't known struct addrinfo hints, *info, *p; ^ newer glibc has now fixed the definitions of getaddrinfo and ilk to be enabled with correct posix version. Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch35
-rw-r--r--recipes-graphics/userland/userland_git.bb1
2 files changed, 36 insertions, 0 deletions
diff --git a/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch b/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch
new file mode 100644
index 0000000..2a092c2
--- /dev/null
+++ b/recipes-graphics/userland/userland/0001-Use-newer-POSIX-macro.patch
@@ -0,0 +1,35 @@
+From 12f7718bb0e08e2c06825c7ab7541b3c5bfe74c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 9 Aug 2015 08:55:05 -0700
+Subject: [PATCH] Use newer POSIX macro
+
+Define _POSIX_C_SOURCE such that it demands correct
+posix interfaces, netdb.h declares interfaces such as
+getaddrinfo if __USE_POSIX, i.e. POSIX.1:1990 or later.
+However, these interfaces were new in the 2001 edition of POSIX
+therefore ask for Extension from POSIX.1:2001 since we use addrinfo
+structure here.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ containers/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/containers/CMakeLists.txt b/containers/CMakeLists.txt
+index a29a885..5570038 100644
+--- a/containers/CMakeLists.txt
++++ b/containers/CMakeLists.txt
+@@ -13,7 +13,7 @@ add_definitions(-DDL_PATH_PREFIX="${VMCS_PLUGIN_DIR}/")
+
+ SET( GCC_COMPILER_FLAGS -Wall -g -O2 -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wcast-qual -Wwrite-strings -Wundef )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wextra )#-Wno-missing-field-initializers )
+-SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=199309L )
++SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -std=c99 -D_POSIX_C_SOURCE=200112L )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-missing-field-initializers )
+ SET( GCC_COMPILER_FLAGS ${GCC_COMPILER_FLAGS} -Wno-unused-value )
+
+--
+2.1.4
+
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb
index dfb6701..2b3286a 100644
--- a/recipes-graphics/userland/userland_git.bb
+++ b/recipes-graphics/userland/userland_git.bb
@@ -16,6 +16,7 @@ SRCFORK = "raspberrypi"
SRCREV = "c2f27fb8e581f8e5af83bf28422553ade8f7a7c8"
SRC_URI = "git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \
+ file://0001-Use-newer-POSIX-macro.patch \
"
S = "${WORKDIR}/git"