Skip to contentSkip to conversation

libnfs: Add cmake checks for sys/uio.h

PATCH In review Khem Raj 2 participants 2 messages Feb 13, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libnfs: Add cmake checks for sys/uio.h

Fixes build issues with latest compiler e.g. gcc-14

---
 .../0001-cmake-Test-for-sys-uio.h.patch       | 44 +++++++++++++++++++
 .../libnfs/libnfs_5.0.3.bb                    |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch
meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch new file +44 -0
new file mode 100644
index 0000000000..de3ab82292
@@ -0,0 +1,44 @@
+From d0fa719d49f38777911a8e99717f2d4b30811080 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 12 Feb 2024 19:24:54 -0800
+Subject: [PATCH] cmake: Test for sys/uio.h
+
+writev() API is used in few places and it will need including sys/uio.h
+for getting the funciton signature
+
+Upstream-Status: Submitted [https://github.com/sahlberg/libnfs/pull/440]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ cmake/ConfigureChecks.cmake | 1 +
+ cmake/config.h.cmake        | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
+index 0258fc8..c26a02d 100644
+--- a/cmake/ConfigureChecks.cmake
++++ b/cmake/ConfigureChecks.cmake
+@@ -22,6 +22,7 @@ check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
+ check_include_file("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H)
+ check_include_file("sys/time.h" HAVE_SYS_TIME_H)
+ check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
++check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
+ check_include_file("sys/vfs.h" HAVE_SYS_VFS_H)
+ check_include_file("unistd.h" HAVE_UNISTD_H)
+ check_include_file("utime.h" HAVE_UTIME_H)
+diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
+index 4016c6c..6263896 100644
+--- a/cmake/config.h.cmake
++++ b/cmake/config.h.cmake
+@@ -90,6 +90,9 @@
+ /* Define to 1 if you have the <sys/types.h> header file. */
+ #cmakedefine HAVE_SYS_TYPES_H
+ 
++/* Define to 1 if you have the <sys/uio.h> header file. */
++#cmakedefine HAVE_SYS_UIO_H
++
+ /* Define to 1 if you have the <sys/vfs.h> header file. */
+ #cmakedefine HAVE_SYS_VFS_H
+ 
+-- 
+2.43.1
+
meta-oe/recipes-connectivity/libnfs/libnfs_5.0.3.bb +1 -0
index 068c827f70..8a470ee2fb 100644
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=825301ba17efc9d188ee0abd4b924ada"
 SRC_URI = " \
 	git://github.com/sahlberg/libnfs.git;protocol=https;branch=master \
 	file://0001-CMakeLists.txt-respect-CMAKE_INSTALL_LIBDIR-for-mult.patch \
+  file://0001-cmake-Test-for-sys-uio.h.patch \
 "
 SRCREV = "4379837536d9eac537810dc7b13071136049b22a"
 S = "${WORKDIR}/git"
Signature · 1 line
2.43.1
#1 lore raw

Thanks for the fix!

Quoted 96 lines · Khem Raj

Fixes build issues with latest compiler e.g. gcc-14

Signed-off-by Khem Raj <[email protected] <mailto:[email protected]>>
Cc Markus Volk <[email protected] <mailto:[email protected]>>
---
 .../0001-cmake-Test-for-sys-uio.h.patch       | 44 
+++++++++++++++++++
 .../libnfs/libnfs_5.0.3.bb                    |  1 +
 2 files changed, 45 insertions(+)
 create mode 100644 

meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch

(quoted diff) +0 -0
new file mode 100644
index 0000000000..de3ab82292

b/meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch

(quoted diff) +1 -0
@@ -0,0 +1,44 @@
+From d0fa719d49f38777911a8e99717f2d4b30811080 Mon Sep 17 00:00:00 

2001

meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch new file +5 -0
+From: Khem Raj <[email protected] <mailto:[email protected]>>
+Date: Mon, 12 Feb 2024 19:24:54 -0800
+Subject: [PATCH] cmake: Test for sys/uio.h
+
+writev() API is used in few places and it will need including 

sys/uio.h

meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch new file +3 -0
+for getting the funciton signature
+
+Upstream-Status: Submitted 

[<https://github.com/sahlberg/libnfs/pull/440>]
+Signed-off-by: Khem Raj <[email protected]
<mailto:[email protected]>>

+---
+ cmake/ConfigureChecks.cmake | 1 +
+ cmake/config.h.cmake        | 3 +++

+ 2 files changed, 4 insertions(+)

(quoted diff) +2 -0
+
+diff --git a/cmake/ConfigureChecks.cmake 

b/cmake/ConfigureChecks.cmake

meta-oe/recipes-connectivity/libnfs/libnfs/0001-cmake-Test-for-sys-uio.h.patch new file +28 -0
+index 0258fc8..c26a02d 100644
+--- a/cmake/ConfigureChecks.cmake
++++ b/cmake/ConfigureChecks.cmake
+@@ -22,6 +22,7 @@ check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
+ check_include_file("sys/sysmacros.h" HAVE_SYS_SYSMACROS_H)
+ check_include_file("sys/time.h" HAVE_SYS_TIME_H)
+ check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
++check_include_file("sys/uio.h" HAVE_SYS_UIO_H)
+ check_include_file("sys/vfs.h" HAVE_SYS_VFS_H)
+ check_include_file("unistd.h" HAVE_UNISTD_H)
+ check_include_file("utime.h" HAVE_UTIME_H)
+diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
+index 4016c6c..6263896 100644
+--- a/cmake/config.h.cmake
++++ b/cmake/config.h.cmake
+@@ -90,6 +90,9 @@
+ /* Define to 1 if you have the <sys/types.h> header file. */
+ #cmakedefine HAVE_SYS_TYPES_H
+
++/* Define to 1 if you have the <sys/uio.h> header file. */
++#cmakedefine HAVE_SYS_UIO_H
++
+ /* Define to 1 if you have the <sys/vfs.h> header file. */
+ #cmakedefine HAVE_SYS_VFS_H
+
+--
+2.43.1
+
meta-oe/recipes-connectivity/libnfs/libnfs_5.0.3.bb +0 -0
index 068c827f70..8a470ee2fb 100644
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = 

"file://COPYING;md5=825301ba17efc9d188ee0abd4b924ada"
SRC_URI = " \
git://github.com/sahlberg/libnfs.git;protocol=https;branch=master \

file://0001-CMakeLists.txt-respect-CMAKE_INSTALL_LIBDIR-for-mult.patch
<file://0001-cmakelists.txt-respect-cmake_install_libdir-for-mult.patch/> \
+ file://0001-cmake-Test-for-sys-uio.h.patch <file://0001-cmake-test-for-sys-uio.h.patch/> \
"
SRCREV = "4379837536d9eac537810dc7b13071136049b22a"
S = "${WORKDIR}/git"
--
2.43.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108719): <https://lists.openembedded.org/g/openembedded-devel/message/108719>
Mute This Topic: <https://lists.openembedded.org/mt/104326527/3618223>
Group Owner: [email protected] <mailto:[email protected]>
Unsubscribe: <https://lists.openembedded.org/g/openembedded-devel/unsub> [[email protected] <mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-