Skip to contentSkip to conversation

cyrus-sasl: ensure size_t is defined for use by sasl.h

PATCH In review Mark Asselstine 2 participants 3 messages Oct 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cyrus-sasl: ensure size_t is defined for use by sasl.h

While making use of the cyrus-sasl library an external application will most likely include sasl.h which will cause compilation failures if steps haven't been taken to define size_t. This should not be the responsibility of the application building against the sasl library but rather handled already in sasl.h. Here we ensure sasl.h has the proper includes to have size_t defined before it is used.

---
 ...clude-sasl.h-needs-to-include-sys-types.h.patch | 37 ++++++++++++++++++++++
 .../cyrus-sasl/cyrus-sasl_2.1.26.bb                |  3 ++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +37 -0
new file mode 100644
index 0000000..ac47b4f
@@ -0,0 +1,37 @@
+From 471b4436a69917fba7c44e366b0393cebc3dace6 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Tue, 29 Oct 2013 23:07:26 -0400
+Subject: [PATCH] include: sasl.h needs to include sys/types.h
+
+size_t is used in sasl.h yet sys/types.h is neither included directly
+or indirectly. This causes build errors if you try to build something
+against the sasl library where .c files including sasl.h haven't
+included sys/types.h or defined size_t on their own. Similar to this
+one:
+
+In file included from rpc/virnetsaslcontext.h:24:0,
+                 from rpc/virnetsaslcontext.c:25:
+../poky/x86-64/tmp/sysroots/qemux86-64/usr/include/sasl/sasl.h:230:38: error: unknown type name 'size_t'
+ typedef void *sasl_realloc_t(void *, size_t);
+
+Signed-off-by: Mark Asselstine <[email protected]>
+---
+ include/sasl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sasl.h b/include/sasl.h
+index fef4d51..36b2553 100755
+--- a/include/sasl.h
++++ b/include/sasl.h
+@@ -130,6 +130,8 @@
+ #define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
+       (SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
+ 
++#include <sys/types.h>
++
+ #include "prop.h"
+ 
+ /*************
+-- 
+1.8.1.2
+
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +3 -0
index f05ab85..5899291 100644
@@ -4,11 +4,14 @@ DEPENDS = "openssl virtual/db"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
 
+PR = "r1"
+
 SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
 	   file://avoid-to-call-AC_TRY_RUN.patch \
 	   file://Fix-hardcoded-libdir.patch \
 	   file://debian_patches_0009_sasldb_al.diff \
 	   file://debian_patches_0014_avoid_pic_overwrite.diff \
+	   file://include-sasl.h-needs-to-include-sys-types.h.patch \
 	   "
 
 inherit autotools pkgconfig useradd
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 27 lines · [[meta-networking][PATCH] cyrus-sasl: ensure size_t is defined for use by…

While making use of the cyrus-sasl library an external application will most likely include sasl.h which will cause compilation failures if steps haven't been taken to define size_t. This should not be the responsibility of the application building against the sasl library but rather handled already in sasl.h. Here we ensure sasl.h has the proper includes to have size_t defined before it is used.

---
 ...clude-sasl.h-needs-to-include-sys-types.h.patch | 37 ++++++++++++++++++++++
 .../cyrus-sasl/cyrus-sasl_2.1.26.bb                |  3 ++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +7 -0
new file mode 100644
index 0000000..ac47b4f
@@ -0,0 +1,37 @@
+From 471b4436a69917fba7c44e366b0393cebc3dace6 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Tue, 29 Oct 2013 23:07:26 -0400
+Subject: [PATCH] include: sasl.h needs to include sys/types.h
+
+size_t is used in sasl.h yet sys/types.h is neither included directly
+or indirectly. This causes build errors if you try to build something

meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch line 17

Quoted 10 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +10 -0
+against the sasl library where .c files including sasl.h haven't
+included sys/types.h or defined size_t on their own. Similar to this
+one:
+
+In file included from rpc/virnetsaslcontext.h:24:0,
+                 from rpc/virnetsaslcontext.c:25:
+../poky/x86-64/tmp/sysroots/qemux86-64/usr/include/sasl/sasl.h:230:38: error: unknown type name 'size_t'
+ typedef void *sasl_realloc_t(void *, size_t);
+
+Signed-off-by: Mark Asselstine <[email protected]>

Can I get the upstream-status of this? I can update the patch myself in my tree or you can send out another version, whatever you prefer.

Quoted 25 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +20 -0
+---
+ include/sasl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sasl.h b/include/sasl.h
+index fef4d51..36b2553 100755
+--- a/include/sasl.h
++++ b/include/sasl.h
+@@ -130,6 +130,8 @@
+ #define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
+       (SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
+ 
++#include <sys/types.h>
++
+ #include "prop.h"
+ 
+ /*************
+-- 
+1.8.1.2
+
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +0 -0
index f05ab85..5899291 100644

meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb DEPENDS = "openssl virtual/db" · line 8

Quoted 5 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +2 -0
@@ -4,11 +4,14 @@ DEPENDS = "openssl virtual/db"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
 
+PR = "r1"
+

I'm pretty sure we don't need a PR bump here anymore.

-J.

Quoted 9 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +1 -0
 SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
 	   file://avoid-to-call-AC_TRY_RUN.patch \
 	   file://Fix-hardcoded-libdir.patch \
 	   file://debian_patches_0009_sasldb_al.diff \
 	   file://debian_patches_0014_avoid_pic_overwrite.diff \
+	   file://include-sasl.h-needs-to-include-sys-types.h.patch \
 	   "
 
 inherit autotools pkgconfig useradd
Signature · 2 lines
-Joe MacDonald.
:wq
#2 lore raw
Quoted 34 lines · Joe MacDonald
Quoted 32 lines · [[meta-networking][PATCH] cyrus-sasl: ensure size_t is defined for use by…

While making use of the cyrus-sasl library an external application will most likely include sasl.h which will cause compilation failures if steps haven't been taken to define size_t. This should not be the responsibility of the application building against the sasl library but rather handled already in sasl.h. Here we ensure sasl.h has the proper includes to have size_t defined before it is used.

---
 ...clude-sasl.h-needs-to-include-sys-types.h.patch | 37 ++++++++++++++++++++++
 .../cyrus-sasl/cyrus-sasl_2.1.26.bb                |  3 ++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +12 -0
new file mode 100644
index 0000000..ac47b4f
@@ -0,0 +1,37 @@
+From 471b4436a69917fba7c44e366b0393cebc3dace6 Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <[email protected]>
+Date: Tue, 29 Oct 2013 23:07:26 -0400
+Subject: [PATCH] include: sasl.h needs to include sys/types.h
+
+size_t is used in sasl.h yet sys/types.h is neither included directly
+or indirectly. This causes build errors if you try to build something
+against the sasl library where .c files including sasl.h haven't
+included sys/types.h or defined size_t on their own. Similar to this
+one:
+
+In file included from rpc/virnetsaslcontext.h:24:0,
Quoted 8 lines

meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch line 17

Quoted 5 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +5 -0
+                 from rpc/virnetsaslcontext.c:25:
+../poky/x86-64/tmp/sysroots/qemux86-64/usr/include/sasl/sasl.h:230:38: error: unknown type name 'size_t'
+ typedef void *sasl_realloc_t(void *, size_t);
+
+Signed-off-by: Mark Asselstine <[email protected]>

Can I get the upstream-status of this? I can update the patch myself in my tree or you can send out another version, whatever you prefer.

I couldn't find their source repo last night and didn't find any similar fixes. Of course I look now and find it easily and do find that they have fixed this. I will send a v2 using the upstream patch, add an upstream status line and remove the PR.

Mark

Quoted 48 lines
Quoted 26 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/include-sasl.h-needs-to-include-sys-types.h.patch new file +20 -0
+---
+ include/sasl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/sasl.h b/include/sasl.h
+index fef4d51..36b2553 100755
+--- a/include/sasl.h
++++ b/include/sasl.h
+@@ -130,6 +130,8 @@
+ #define SASL_VERSION_FULL ((SASL_VERSION_MAJOR << 16) |\
+       (SASL_VERSION_MINOR << 8) | SASL_VERSION_STEP)
+
++#include <sys/types.h>
++
+ #include "prop.h"
+
+ /*************
+--
+1.8.1.2
+
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +0 -0
index f05ab85..5899291 100644

meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb DEPENDS = "openssl virtual/db" · line 8

Quoted 5 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +2 -0
@@ -4,11 +4,14 @@ DEPENDS = "openssl virtual/db"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
 
+PR = "r1"
+

I'm pretty sure we don't need a PR bump here anymore.

-J.

meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb DEPENDS = "openssl virtual/db" · line 17

Quoted 9 lines
meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +1 -0
 SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \
         file://avoid-to-call-AC_TRY_RUN.patch \
         file://Fix-hardcoded-libdir.patch \
         file://debian_patches_0009_sasldb_al.diff \
         file://debian_patches_0014_avoid_pic_overwrite.diff \
+        file://include-sasl.h-needs-to-include-sys-types.h.patch \
         "
 
 inherit autotools pkgconfig useradd

--
-Joe MacDonald.
:wq