Patchwork [3/3] socat: fix linux/errqueue.h not found

login
register
mail settings
Submitter Hongxu Jia
Date May 27, 2014, 1:59 a.m.
Message ID <63ab824a613874b93978ebf17afe2f6d69a58faf.1401155797.git.hongxu.jia@windriver.com>
Download mbox | patch
Permalink /patch/72771/
State New
Headers show

Comments

Hongxu Jia - May 27, 2014, 1:59 a.m.
The do_compile failed:
...
|tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/socat-1.7.2.4/xio-ip.c:
In function 'xiolog_ancillary_ip':
|tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/socat-1.7.2.4/xio-ip.c:520:12:
error: dereferencing pointer to incomplete type
|         err->ee_errno, '\0', err->ee_origin, '\0', err->ee_type, '\0',
|            ^
| ake: *** [xio-ip.o] Error 1
...

For 1.7.2.4, the header check of 'linux/errqueue.h ' was not correctly,
but the old version 1.7.2.3 worked, so we reference 1.7.2.3 to fix this
issue.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../socat/fix-linux-errqueue.h-not-found.patch     | 40 ++++++++++++++++++++++
 meta/recipes-connectivity/socat/socat_1.7.2.4.bb   |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 meta/recipes-connectivity/socat/socat/fix-linux-errqueue.h-not-found.patch
Ross Burton - May 27, 2014, 11:43 a.m.
On 27 May 2014 02:59, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> +-AC_CHECK_HEADERS(linux/types.h)
> +-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
> ++AC_CHECK_HEADERS(linux/types.h linux/errqueue.h)

Have you checked the config.log and config.h to verify this is actually working?

It looks like you're simply removing the AC_DEFINE of
HAVE_LINUX_ERRQUEUE_H which is used as a guard around
<linux/errqueue.h> in sysincludes.h.

Ross
Hongxu Jia - May 28, 2014, 5:57 a.m.
On 05/27/2014 07:43 PM, Burton, Ross wrote:
> On 27 May 2014 02:59, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> +-AC_CHECK_HEADERS(linux/types.h)
>> +-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
>> ++AC_CHECK_HEADERS(linux/types.h linux/errqueue.h)
> Have you checked the config.log and config.h to verify this is actually working?
>
> It looks like you're simply removing the AC_DEFINE of
> HAVE_LINUX_ERRQUEUE_H which is used as a guard around
> <linux/errqueue.h> in sysincludes.h.

I took a look, and found out the 'AC_DEFINE' didn't work,
...
-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], 
[#include <linux/types.h>])
+AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H, [1], 
[With linux errqueue header]), [], [#include <linux/types.h>])
...

The fix was the same with compile.patch, I will merged it to compile.patch.

//Hongxu

> Ross

Patch

diff --git a/meta/recipes-connectivity/socat/socat/fix-linux-errqueue.h-not-found.patch b/meta/recipes-connectivity/socat/socat/fix-linux-errqueue.h-not-found.patch
new file mode 100644
index 0000000..3823eaf
--- /dev/null
+++ b/meta/recipes-connectivity/socat/socat/fix-linux-errqueue.h-not-found.patch
@@ -0,0 +1,40 @@ 
+configure.in: fix linux/errqueue.h not found
+
+The do_compile failed:
+...
+|tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/socat-1.7.2.4/xio-ip.c:
+In function 'xiolog_ancillary_ip':
+|tmp/work/core2-64-poky-linux/socat/1.7.2.4-r0/socat-1.7.2.4/xio-ip.c:520:12:
+error: dereferencing pointer to incomplete type
+|         err->ee_errno, '\0', err->ee_origin, '\0', err->ee_type, '\0',
+|            ^
+| ake: *** [xio-ip.o] Error 1
+...
+
+For 1.7.2.4, the header check of 'linux/errqueue.h ' was not correctly,
+but the old version 1.7.2.3 worked, so we reference 1.7.2.3 to fix this
+issue.
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 70922f9..bdfbe98 100644
+--- a/configure.in
++++ b/configure.in
+@@ -79,8 +79,7 @@ AC_HEADER_RESOLV()
+ 
+ AC_CHECK_HEADERS(termios.h linux/if_tun.h)
+ AC_CHECK_HEADERS(net/if_dl.h)
+-AC_CHECK_HEADERS(linux/types.h)
+-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include <linux/types.h>])
++AC_CHECK_HEADERS(linux/types.h linux/errqueue.h)
+ AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h)
+ AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h)
+ AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h)
+-- 
+1.8.1.2
+
diff --git a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
index 6febe5e..777125f 100644
--- a/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
+++ b/meta/recipes-connectivity/socat/socat_1.7.2.4.bb
@@ -16,6 +16,7 @@  SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
            file://compile.patch \
            file://fix-xxx_SHIFT-autoheader.patch \
            file://fix-cross-compiling-failed.patch \
+           file://fix-linux-errqueue.h-not-found.patch \
 "