Patchwork [11/11] libecore: fix build with glibc >=2.16

login
register
mail settings
Submitter Samuel Martin
Date July 22, 2012, 1:28 p.m.
Message ID <1342963719-1810-12-git-send-email-s.martin49@gmail.com>
Download mbox | patch
Permalink /patch/172513/
State Superseded
Headers show

Comments

Samuel Martin - July 22, 2012, 1:28 p.m.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>

 create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
Thomas Petazzoni - July 22, 2012, 2:45 p.m.
Le Sun, 22 Jul 2012 15:28:39 +0200,
Samuel Martin <s.martin49@gmail.com> a écrit :

> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Wouldn't it be better to backport the upstream fix, i.e
http://trac.enlightenment.org/e/changeset/72684/ ?

Thanks,

Thomas
Peter Korsgaard - Oct. 10, 2012, 9:28 p.m.
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

Hi,

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

 Samuel>  create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch

 Samuel> diff --git a/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
 Samuel> new file mode 100644
 Samuel> index 0000000..9d53dfd
 Samuel> --- /dev/null
 Samuel> +++ b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
 Samuel> @@ -0,0 +1,62 @@
 Samuel> +This patch fix build with glibc-2.16, avoiding the following error occurs:
 Samuel> +

Did you send this patch upstream? If so, what is the status of it?
Samuel Martin - Oct. 11, 2012, 9:26 a.m.
Hi,

2012/10/10 Peter Korsgaard <jacmet@uclibc.org>:
>>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
>
> Hi,
>
>  Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
>  Samuel>  create mode 100644 package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
>
>  Samuel> diff --git a/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
>  Samuel> new file mode 100644
>  Samuel> index 0000000..9d53dfd
>  Samuel> --- /dev/null
>  Samuel> +++ b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
>  Samuel> @@ -0,0 +1,62 @@
>  Samuel> +This patch fix build with glibc-2.16, avoiding the following error occurs:
>  Samuel> +
>
> Did you send this patch upstream? If so, what is the status of it?
Arf... Got lost in my mailbox... So no, I haven't sent it upstream.

I willl check upstream and let you know its status.
Thomas Petazzoni - Oct. 11, 2012, 3:15 p.m.
On Thu, 11 Oct 2012 11:26:59 +0200, Samuel Martin wrote:

> > Did you send this patch upstream? If so, what is the status of it?
> Arf... Got lost in my mailbox... So no, I haven't sent it upstream.
> 
> I willl check upstream and let you know its status.

Well, back in July, I said:
http://lists.busybox.net/pipermail/buildroot/2012-July/056005.html

Thomas
Samuel Martin - Oct. 13, 2012, 9:38 a.m.
Hi Thomas, Peter, all,

2012/10/11 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
>
> On Thu, 11 Oct 2012 11:26:59 +0200, Samuel Martin wrote:
>
>> > Did you send this patch upstream? If so, what is the status of it?
>> Arf... Got lost in my mailbox... So no, I haven't sent it upstream.
>>
>> I willl check upstream and let you know its status.
>
> Well, back in July, I said:
> http://lists.busybox.net/pipermail/buildroot/2012-July/056005.html
>
Thomas, thanks for the reminder ;)

The upstream patch works too.
I'll post it shortly


Regards,

Patch

diff --git a/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
new file mode 100644
index 0000000..9d53dfd
--- /dev/null
+++ b/package/efl/libecore/libecore-ecore_exec-c-fix-build-with-glibc-2-16.patch
@@ -0,0 +1,62 @@ 
+This patch fix build with glibc-2.16, avoiding the following error occurs:
+
+Making all in ecore
+make[6]: Entering directory `/opt/buildroot/output/build/host-libecore-1.1.0/src/lib/ecore'
+  CC     ecore.lo
+  CC     ecore_anim.lo
+  CC     ecore_app.lo
+  CC     ecore_events.lo
+  CC     ecore_getopt.lo
+  CC     ecore_idle_enterer.lo
+  CC     ecore_idle_exiter.lo
+  CC     ecore_idler.lo
+  CC     ecore_job.lo
+  CC     ecore_main.lo
+  CC     ecore_pipe.lo
+  CC     ecore_poll.lo
+  CC     ecore_time.lo
+  CC     ecore_timer.lo
+  CC     ecore_thread.lo
+  CC     ecore_glib.lo
+  CC     ecore_throttle.lo
+  CC     ecore_signal.lo
+  CC     ecore_exe.lo
+ecore_exe.c: In function ‘ecore_exe_pipe_run’:
+ecore_exe.c:486:15: warning: implicit declaration of function ‘setpriority’ [-Wimplicit-function-declaration]
+ecore_exe.c:486:27: error ‘PRIO_PROCESS’ undeclared (first use in this function)
+ecore_exe.c:486:27: note: each undeclared identifier is reported only once for each function it appears in
+make[6]: *** [ecore_exe.lo] Error 1
+
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+
+---
+diff -purN host-libecore-1.1.0.orig/src/lib/ecore/ecore_exe.c host-libecore-1.1.0/src/lib/ecore/ecore_exe.c
+--- host-libecore-1.1.0.orig/src/lib/ecore/ecore_exe.c	2011-10-21 07:37:11.000000000 +0200
++++ host-libecore-1.1.0/src/lib/ecore/ecore_exe.c	2012-07-22 10:46:00.362956073 +0200
+@@ -2,11 +2,6 @@
+ # include <config.h>
+ #endif
+ 
+-#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
+-# include <sys/time.h>
+-# include <sys/resource.h>
+-#endif
+-
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -15,6 +10,13 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ 
++#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || ( defined(__linux__) && defined(__GLIBC__) && !defined(__UCLIBC__) && __GLIBC_PREREQ(2, 16) )
++# if !defined(__linux__)
++#  include <sys/time.h>
++# endif
++# include <sys/resource.h>
++#endif
++
+ #ifdef HAVE_SYS_PRCTL_H
+ # include <sys/prctl.h>
+ #endif