From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 68/73] mdadm: Fix build with musl
Date: Sun, 17 Jan 2016 03:36:41 -0800 [thread overview]
Message-ID: <a8d86f976ca4573df82fab90bcdafb393e71af73.1453029952.git.raj.khem@gmail.com> (raw)
In-Reply-To: <a11d14dd08dcef1c508ae13079284cfb96629c50.1453029952.git.raj.khem@gmail.com>
In-Reply-To: <cover.1453029952.git.raj.khem@gmail.com>
Define _POSIX_C_SOURCE if not defined
Add sockaddr_un* to sockaddr* typecast to make compiler happy
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-Define-_POSIX_C_SOURCE-if-undefined.patch | 59 ++++++++++++++++++++++
meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 2 +-
2 files changed, 60 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
diff --git a/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch b/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
new file mode 100644
index 0000000..a461b76
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/0001-Define-_POSIX_C_SOURCE-if-undefined.patch
@@ -0,0 +1,59 @@
+From d74b02d4653d1ea26029c2528eb93d7268b83eb3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 07:28:33 +0000
+Subject: [PATCH] Define _POSIX_C_SOURCE if undefined
+
+typecast second argument of connect() API to use struct sockaddr*
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ config.c | 3 +++
+ mdmon.c | 2 +-
+ msg.c | 2 +-
+ 3 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/config.c b/config.c
+index a882ed3..a675688 100644
+--- a/config.c
++++ b/config.c
+@@ -63,6 +63,9 @@
+ * but may not wrap over lines
+ *
+ */
++#ifndef _POSIX_C_SOURCE
++#define _POSIX_C_SOURCE 200809L
++#endif
+
+ #ifndef CONFFILE
+ #define CONFFILE "/etc/mdadm.conf"
+diff --git a/mdmon.c b/mdmon.c
+index ee12b7c..e4b73d9 100644
+--- a/mdmon.c
++++ b/mdmon.c
+@@ -235,7 +235,7 @@ static int make_control_sock(char *devname)
+ addr.sun_family = PF_LOCAL;
+ strcpy(addr.sun_path, path);
+ umask(077); /* ensure no world write access */
+- if (bind(sfd, &addr, sizeof(addr)) < 0) {
++ if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ close(sfd);
+ return -1;
+ }
+diff --git a/msg.c b/msg.c
+index 754630b..45cd450 100644
+--- a/msg.c
++++ b/msg.c
+@@ -170,7 +170,7 @@ int connect_monitor(char *devname)
+
+ addr.sun_family = PF_LOCAL;
+ strcpy(addr.sun_path, path);
+- if (connect(sfd, &addr, sizeof(addr)) < 0) {
++ if (connect(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
+ close(sfd);
+ return -1;
+ }
+--
+2.7.0
+
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
index 0993611..e004030 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
@@ -14,13 +14,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
file://mdadm-3.3.2_x32_abi_time_t.patch \
file://0001-Fix-typo-in-comparision.patch \
file://mdadm-fix-ptest-build-errors.patch \
+ file://0001-Define-_POSIX_C_SOURCE-if-undefined.patch \
file://run-ptest \
"
SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
CFLAGS += "-fno-strict-aliasing"
-
inherit autotools-brokensep
EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
--
2.7.0
next prev parent reply other threads:[~2016-01-17 11:38 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-17 11:36 [PATCH 00/73] musl fixes part 3 & 4 combined Khem Raj
2016-01-17 11:35 ` [PATCH 01/73] powertop: Include right headers for timval struct Khem Raj
2016-01-17 11:35 ` [PATCH 02/73] blktrace: Include <sys/types.h for dev_t Khem Raj
2016-01-17 11:35 ` [PATCH 03/73] ppp: Fix build with musl Khem Raj
2016-01-17 11:35 ` [PATCH 04/73] tcp-wrappers: " Khem Raj
2016-01-17 11:35 ` [PATCH 05/73] fts: Add recipe Khem Raj
2016-01-17 11:35 ` [PATCH 06/73] connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR Khem Raj
2016-01-17 11:35 ` [PATCH 07/73] libcgroup: Add dependency on fts when building on musl Khem Raj
2016-01-17 11:35 ` [PATCH 08/73] linux-libc-headers: Port patches for linux-headers for musl Khem Raj
2016-01-17 11:35 ` [PATCH 09/73] xserver-xorg: Fix build with musl Khem Raj
2016-01-17 11:35 ` [PATCH 10/73] gdk-pixbuf: Fix latent build issue exposed by musl Khem Raj
2016-01-17 11:35 ` [PATCH 11/73] argp-standalone: Add recipe Khem Raj
2016-01-17 11:35 ` [PATCH 12/73] gnutls: Link with libargp on musl and depend on argp-standalone Khem Raj
2016-01-17 11:35 ` [PATCH 13/73] util-linux: Fix ptest builds on musl Khem Raj
2016-01-17 11:35 ` [PATCH 14/73] elfutils: Fix build with uclibc/musl Khem Raj
2016-01-22 12:26 ` Burton, Ross
2016-01-22 17:01 ` Khem Raj
2016-01-17 11:35 ` [PATCH 15/73] systemd: Update and fix build with uclibc Khem Raj
2016-01-22 12:34 ` Burton, Ross
2016-01-22 16:29 ` Khem Raj
2016-01-17 11:35 ` [PATCH 16/73] packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only case Khem Raj
2016-01-17 11:35 ` [PATCH 17/73] guile: Fix build with uclibc Khem Raj
2016-01-17 11:35 ` [PATCH 18/73] gnutls: Link with libuargp on uclibc Khem Raj
2016-01-17 11:35 ` [PATCH 19/73] mtools: Fix build with uclibc Khem Raj
2016-01-18 7:17 ` Roman Khimov
2016-01-18 21:51 ` Khem Raj
2016-01-19 6:17 ` Roman Khimov
2016-01-19 15:00 ` Khem Raj
2016-01-17 11:35 ` [PATCH 20/73] parted: " Khem Raj
2016-01-17 11:35 ` [PATCH 21/73] net-tools: Link with libintl on uclibc Khem Raj
2016-01-17 11:35 ` [PATCH 22/73] libdrm: Upgrade 2.4.65 -> 2.4.66 Khem Raj
2016-01-18 15:40 ` Burton, Ross
2016-01-18 21:29 ` Khem Raj
2016-01-17 11:35 ` [PATCH 23/73] directfb: Fix build with musl Khem Raj
2016-01-17 11:35 ` [PATCH 24/73] gzip: " Khem Raj
2016-01-17 11:35 ` [PATCH 25/73] watchdog: " Khem Raj
2016-01-17 11:35 ` [PATCH 26/73] xinetd: " Khem Raj
2016-01-17 11:36 ` [PATCH 27/73] dpkg: Add musleabi to known architectures Khem Raj
2016-01-17 11:36 ` [PATCH 28/73] puzzles: Zero'ise structs before use Khem Raj
2016-01-17 11:36 ` [PATCH 29/73] apt: Add support for building for musl targets Khem Raj
2016-01-17 11:36 ` [PATCH 30/73] libunwind: backtrace APIs are glibc specific Khem Raj
2016-01-17 11:36 ` [PATCH 31/73] babeltrace: Add missing header for MAXNAMLEN define Khem Raj
2016-01-17 11:36 ` [PATCH 32/73] sysklogd: untangle header inclusion maze Khem Raj
2016-01-17 11:36 ` [PATCH 33/73] console-tools: Include sys/types.h for u_char and u_short defs Khem Raj
2016-01-17 11:36 ` [PATCH 34/73] webkitgtk: Fix build with clang/musl Khem Raj
2016-01-17 11:36 ` [PATCH 35/73] rt-tests: Fix build with non-gcc compilers Khem Raj
2016-01-17 11:36 ` [PATCH 36/73] tar: Fix build for musl based targets Khem Raj
2016-01-17 11:36 ` [PATCH 37/73] pax: Fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 38/73] iputils: Use member based initialization for mrghdr struct Khem Raj
2016-01-17 11:36 ` [PATCH 39/73] libuser: Fix build when secure getenv is not there Khem Raj
2016-01-17 11:36 ` [PATCH 40/73] iproute2: Fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 41/73] irda-utils: Fix header inclusions Khem Raj
2016-01-17 11:36 ` [PATCH 42/73] nspr: Drop older glibc code Khem Raj
2016-01-17 11:36 ` [PATCH 43/73] chkconfig: Avoid using caddr_t Khem Raj
2016-01-17 11:36 ` [PATCH 44/73] tcf-agent: Implement canonicalize_file_name() for musl as well Khem Raj
2016-01-17 11:36 ` [PATCH 45/73] bsd-headers, musl: Add recipe for bsd missing features Khem Raj
2016-01-17 11:36 ` [PATCH 46/73] nfs-utils: Disable tcp-wrappers for musl Khem Raj
2016-01-17 11:36 ` [PATCH 47/73] portmap: Point to tirpc headers and libraries on musl Khem Raj
2016-01-17 11:36 ` [PATCH 48/73] oprofile: fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 49/73] systemd: Skip parsing on musl based targets Khem Raj
2016-01-17 11:36 ` [PATCH 50/73] libsolv: Update to 0.6.17+ Khem Raj
2016-01-17 11:36 ` [PATCH 51/73] db: Use cross libtool Khem Raj
2016-01-22 12:41 ` Burton, Ross
2016-01-22 17:08 ` Khem Raj
2016-01-17 11:36 ` [PATCH 52/73] kexec-tools: Define _GNU_SOURCE for getting loff_t definition Khem Raj
2016-01-17 11:36 ` [PATCH 53/73] pcmciautils: Fix parallel build and include sys/types.h Khem Raj
2016-01-17 11:36 ` [PATCH 54/73] btrfs-tools: Disable backtrace on musl Khem Raj
2016-01-22 12:39 ` Burton, Ross
2016-01-22 16:29 ` Khem Raj
2016-01-17 11:36 ` [PATCH 55/73] apmd: Fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 56/73] nss: Undefine HAVE_SYS_CDEFS_H Khem Raj
2016-01-17 11:36 ` [PATCH 57/73] dosfstools: Correct cross-compile CFLAGS and fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 58/73] fts: Fix linker hash-style option Khem Raj
2016-01-17 11:36 ` [PATCH 59/73] musl: Create ld.so as a relative symlink Khem Raj
2016-01-17 11:36 ` [PATCH 60/73] bsd-headers: Package cdefs.h Khem Raj
2016-01-17 11:36 ` [PATCH 61/73] guile: Fix build with musl Khem Raj
2016-01-17 11:36 ` [PATCH 62/73] unfs3: Depend on libtirpc when building on musl Khem Raj
2016-01-17 11:36 ` [PATCH 63/73] uclibc: Update to 1.0.11 Khem Raj
2016-01-17 11:36 ` [PATCH 64/73] acpid: Fix build on musl Khem Raj
2016-01-22 12:43 ` Burton, Ross
2016-01-22 16:28 ` Khem Raj
2016-01-17 11:36 ` [PATCH 65/73] grub: Backport fix for largefile detection/use Khem Raj
2016-01-22 12:32 ` Burton, Ross
2016-01-22 16:58 ` Khem Raj
2016-01-17 11:36 ` [PATCH 66/73] console-tools: Fix header inclusion when not using glibc Khem Raj
2016-01-17 11:36 ` [PATCH 67/73] gpgme: Define __error_t_defined on musl Khem Raj
2016-01-17 11:36 ` Khem Raj [this message]
2016-01-17 11:36 ` [PATCH 69/73] eglinfo: Fix build on raspberrypi Khem Raj
2016-01-17 11:36 ` [PATCH 70/73] puzzles: Silence warning on arm with clang Khem Raj
2016-01-17 11:36 ` [PATCH 71/73] binutils: Fix gold linking errors due to unresolved R_ARM_MOVW_ABS_NC Khem Raj
2016-01-17 11:36 ` [PATCH 72/73] syslinux: Set LD to avoid using build host ld Khem Raj
2016-01-17 11:36 ` [PATCH 73/73] glib-2.0: Fix locale location on musl Khem Raj
2016-01-18 21:39 ` [PATCH 00/73] musl fixes part 3 & 4 combined Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8d86f976ca4573df82fab90bcdafb393e71af73.1453029952.git.raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox