Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 684966 Details for
Bug 762008
sys-fs/cryptsetup-2.3.2[static]: fails to build (multiple definition of `close_all_fds')
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Ported patch from upstream for util-linux
multiple-func-defs.patch.1 (text/plain), 3.25 KB, created by
Stefan Huber
on 2021-01-28 10:31:54 UTC
(
hide
)
Description:
Ported patch from upstream for util-linux
Filename:
MIME Type:
Creator:
Stefan Huber
Created:
2021-01-28 10:31:54 UTC
Size:
3.25 KB
patch
obsolete
>commit 00a2dba38c993433f737eb40a1e13c1584caa7ff (HEAD -> patch) >Author: Stefan Huber <shuber@sthu.org> >Date: Thu Jan 28 11:13:45 2021 +0100 > > lib: use ul_prefix for close_all_fds() and mkdir_p() > > This is a port of commit 867df261 wich originally states: > > > The names are too generic and it makes problems in static libraries. > > > > Addresses: https://gitlab.com/cryptsetup/cryptsetup/-/issues/623 > > Signed-off-by: Karel Zak <kzak@redhat.com> > >diff --git a/include/fileutils.h b/include/fileutils.h >index 479ad15cf..ba8ebd6c0 100644 >--- a/include/fileutils.h >+++ b/include/fileutils.h >@@ -55,7 +55,7 @@ static inline int is_same_inode(const int fd, const struct stat *st) > extern int dup_fd_cloexec(int oldfd, int lowfd); > extern int get_fd_tabsize(void); > >-extern int mkdir_p(const char *path, mode_t mode); >+extern int ul_mkdir_p(const char *path, mode_t mode); > extern char *stripoff_last_component(char *path); > > /* This is readdir()-like function, but skips "." and ".." directory entries */ >@@ -72,6 +72,6 @@ static inline struct dirent *xreaddir(DIR *dp) > return d; > } > >-extern void close_all_fds(const int exclude[], size_t exsz); >+extern void ul_close_all_fds(const int exclude[], size_t exsz); > > #endif /* UTIL_LINUX_FILEUTILS */ >diff --git a/lib/fileutils.c b/lib/fileutils.c >index 3ca43c1fb..da61be644 100644 >--- a/lib/fileutils.c >+++ b/lib/fileutils.c >@@ -135,7 +135,7 @@ static inline int in_set(int x, const int set[], size_t setsz) > return 0; > } > >-void close_all_fds(const int exclude[], size_t exsz) >+void ul_close_all_fds(const int exclude[], size_t exsz) > { > struct dirent *d; > DIR *dir; >@@ -191,14 +191,14 @@ int main(int argc, char *argv[]) > ignore_result( dup(STDIN_FILENO) ); > ignore_result( dup(STDIN_FILENO) ); > >- close_all_fds(wanted_fds, ARRAY_SIZE(wanted_fds)); >+ ul_close_all_fds(wanted_fds, ARRAY_SIZE(wanted_fds)); > } > return EXIT_SUCCESS; > } > #endif > > >-int mkdir_p(const char *path, mode_t mode) >+int ul_mkdir_p(const char *path, mode_t mode) > { > char *p, *dir; > int rc = 0; >diff --git a/libmount/src/context.c b/libmount/src/context.c >index 91fe8e4bf..25a3a9199 100644 >--- a/libmount/src/context.c >+++ b/libmount/src/context.c >@@ -1951,7 +1951,7 @@ int mnt_context_prepare_target(struct libmnt_context *cxt) > > /* supported only for root or non-suid mount(8) */ > if (!mnt_context_is_restricted(cxt)) { >- rc = mkdir_p(tgt, mode); >+ rc = ul_mkdir_p(tgt, mode); > if (rc) > DBG(CXT, ul_debug("mkdir %s failed: %m", tgt)); > } else >diff --git a/libmount/src/utils.c b/libmount/src/utils.c >index ffbd0c170..b7b22d5b6 100644 >--- a/libmount/src/utils.c >+++ b/libmount/src/utils.c >@@ -1451,7 +1451,7 @@ static int test_mkdir(struct libmnt_test *ts, int argc, char *argv[]) > { > int rc; > >- rc = mkdir_p(argv[1], S_IRWXU | >+ rc = ul_mkdir_p(argv[1], S_IRWXU | > S_IRGRP | S_IXGRP | > S_IROTH | S_IXOTH); > if (rc) >diff --git a/login-utils/login.c b/login-utils/login.c >index 23bb3c434..e9576d273 100644 >--- a/login-utils/login.c >+++ b/login-utils/login.c >@@ -1219,7 +1219,7 @@ int main(int argc, char **argv) > *p++ = ' '; > } > >- close_all_fds(wanted_fds, ARRAY_SIZE(wanted_fds)); >+ ul_close_all_fds(wanted_fds, ARRAY_SIZE(wanted_fds)); > > setpgrp(); /* set pgid to pid this means that setsid() will fail */ > init_tty(&cxt);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 762008
:
679904
|
679907
|
683821
| 684966