From 8260253c8768a1891ba224e2ac1e2a6fa8f12275 Mon Sep 17 00:00:00 2001 From: Yi Zhao Date: Tue, 8 Jun 2021 21:50:43 +0800 Subject: samba: disable check fcntl RW_HINTS when configure This fails on cross-compilation for musl and clang. Fixes configure error: Checking whether fcntl supports setting/geting hints: UNKNOWN Signed-off-by: Yi Zhao Signed-off-by: Khem Raj --- ...rce3-wscript-disable-check-fcntl-RW_HINTS.patch | 92 ++++++++++++++++++++++ ...rce3-wscript-disable-check-fcntl-RW_HINTS.patch | 92 ---------------------- .../recipes-connectivity/samba/samba_4.14.4.bb | 2 +- 3 files changed, 93 insertions(+), 93 deletions(-) create mode 100644 meta-networking/recipes-connectivity/samba/samba/0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch delete mode 100644 meta-networking/recipes-connectivity/samba/samba/source3-wscript-disable-check-fcntl-RW_HINTS.patch (limited to 'meta-networking/recipes-connectivity/samba') diff --git a/meta-networking/recipes-connectivity/samba/samba/0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch b/meta-networking/recipes-connectivity/samba/samba/0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch new file mode 100644 index 000000000..a0b751034 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch @@ -0,0 +1,92 @@ +From 9942bca2e276c7b4c7696a08594258430c4c5bb5 Mon Sep 17 00:00:00 2001 +From: Yi Zhao +Date: Thu, 3 Jun 2021 09:39:56 +0800 +Subject: [PATCH] source3/wscript: disable check fcntl RW_HINTS + +It fails on cross-compilation for musl. + +Fixes configure error: + Checking whether fcntl supports setting/geting hints: UNKNOWN + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao +--- + source3/wscript | 61 ------------------------------------------------- + 1 file changed, 61 deletions(-) + +diff --git a/source3/wscript b/source3/wscript +index f6de0a6..3e260c1 100644 +--- a/source3/wscript ++++ b/source3/wscript +@@ -1164,67 +1164,6 @@ err: + execute=True, + msg="Checking whether fcntl lock supports open file description locks") + +- conf.CHECK_CODE(''' +-#include +-#include +-#include +-#include +- +-#define DATA "hinttest.fcntl" +- +-int main(void) +-{ +- uint64_t hint, get_hint; +- int fd; +- +- fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL); +- if (fd == -1) { +- goto err; +- } +- +- hint = RWH_WRITE_LIFE_SHORT; +- int ret = fcntl(fd, F_SET_RW_HINT, &hint); +- if (ret == -1) { +- goto err; +- } +- +- ret = fcntl(fd, F_GET_RW_HINT, &get_hint); +- if (ret == -1) { +- goto err; +- } +- +- if (get_hint != RWH_WRITE_LIFE_SHORT) { +- goto err; +- } +- +- hint = RWH_WRITE_LIFE_EXTREME; +- ret = fcntl(fd, F_SET_FILE_RW_HINT, &hint); +- if (ret == -1) { +- goto err; +- } +- +- ret = fcntl(fd, F_GET_FILE_RW_HINT, &get_hint); +- if (ret == -1) { +- goto err; +- } +- +- if (get_hint != RWH_WRITE_LIFE_EXTREME) { +- goto err; +- } +- +- close(fd); +- unlink(DATA); +- exit(0); +-err: +- close(fd); +- unlink(DATA); +- exit(1); +-}''', +- 'HAVE_RW_HINTS', +- addmain=False, +- execute=True, +- msg="Checking whether fcntl supports setting/geting hints") +- + conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', + define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris + conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec', +-- +2.17.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/source3-wscript-disable-check-fcntl-RW_HINTS.patch b/meta-networking/recipes-connectivity/samba/samba/source3-wscript-disable-check-fcntl-RW_HINTS.patch deleted file mode 100644 index a0b751034..000000000 --- a/meta-networking/recipes-connectivity/samba/samba/source3-wscript-disable-check-fcntl-RW_HINTS.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 9942bca2e276c7b4c7696a08594258430c4c5bb5 Mon Sep 17 00:00:00 2001 -From: Yi Zhao -Date: Thu, 3 Jun 2021 09:39:56 +0800 -Subject: [PATCH] source3/wscript: disable check fcntl RW_HINTS - -It fails on cross-compilation for musl. - -Fixes configure error: - Checking whether fcntl supports setting/geting hints: UNKNOWN - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: Yi Zhao ---- - source3/wscript | 61 ------------------------------------------------- - 1 file changed, 61 deletions(-) - -diff --git a/source3/wscript b/source3/wscript -index f6de0a6..3e260c1 100644 ---- a/source3/wscript -+++ b/source3/wscript -@@ -1164,67 +1164,6 @@ err: - execute=True, - msg="Checking whether fcntl lock supports open file description locks") - -- conf.CHECK_CODE(''' --#include --#include --#include --#include -- --#define DATA "hinttest.fcntl" -- --int main(void) --{ -- uint64_t hint, get_hint; -- int fd; -- -- fd = open(DATA, O_RDONLY | O_CREAT | O_EXCL); -- if (fd == -1) { -- goto err; -- } -- -- hint = RWH_WRITE_LIFE_SHORT; -- int ret = fcntl(fd, F_SET_RW_HINT, &hint); -- if (ret == -1) { -- goto err; -- } -- -- ret = fcntl(fd, F_GET_RW_HINT, &get_hint); -- if (ret == -1) { -- goto err; -- } -- -- if (get_hint != RWH_WRITE_LIFE_SHORT) { -- goto err; -- } -- -- hint = RWH_WRITE_LIFE_EXTREME; -- ret = fcntl(fd, F_SET_FILE_RW_HINT, &hint); -- if (ret == -1) { -- goto err; -- } -- -- ret = fcntl(fd, F_GET_FILE_RW_HINT, &get_hint); -- if (ret == -1) { -- goto err; -- } -- -- if (get_hint != RWH_WRITE_LIFE_EXTREME) { -- goto err; -- } -- -- close(fd); -- unlink(DATA); -- exit(0); --err: -- close(fd); -- unlink(DATA); -- exit(1); --}''', -- 'HAVE_RW_HINTS', -- addmain=False, -- execute=True, -- msg="Checking whether fcntl supports setting/geting hints") -- - conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', - define='HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC') # Linux, Solaris - conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtimensec', --- -2.17.1 - diff --git a/meta-networking/recipes-connectivity/samba/samba_4.14.4.bb b/meta-networking/recipes-connectivity/samba/samba_4.14.4.bb index 2e0bdceab..0e6f134c2 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.14.4.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.14.4.bb @@ -23,6 +23,7 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://0006-samba-defeat-iconv-test.patch \ file://0007-wscript_configure_system_gnutls-disable-check-gnutls.patch \ file://0008-source3-wscript-disable-check-fcntl-F_OWNER_EX.patch \ + file://0009-source3-wscript-disable-check-fcntl-RW_HINTS.patch \ " SRC_URI_append_libc-musl = " \ @@ -31,7 +32,6 @@ SRC_URI_append_libc-musl = " \ file://samba-4.3.9-remove-getpwent_r.patch \ file://cmocka-uintptr_t.patch \ file://samba-fix-musl-lib-without-innetgr.patch \ - file://source3-wscript-disable-check-fcntl-RW_HINTS.patch \ " SRC_URI[md5sum] = "171629ad42b4b303107e8b0fff942a1f" -- cgit v1.2.3-54-g00ecf