[MacPorts] #58296: fakeroot @1.22: hangs on interrupted system call
MacPorts
noreply at macports.org
Sun Nov 17 09:49:21 UTC 2019
#58296: fakeroot @1.22: hangs on interrupted system call
-----------------------+------------------------
Reporter: sbingner | Owner: ryandesign
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 2.5.4
Resolution: fixed | Keywords: haspatch
Port: fakeroot |
-----------------------+------------------------
Comment (by sbingner):
Can confirm that 1.24 did fix this but I had to patch it to get it to work
as it was not correctly replacing `next_openat` with `openat` in the
function to handle `openat` -- not sure if my patch was proper but it
made it work and I verified that it works on openat calls as well. This
may have been some quirk in my build environment because I can't imagine
nobody noticing that fakeroot always crashed with an error about a missing
`next_openat` symbol
{{{
--- wrapfunc.inp 2019-11-16 22:33:24.000000000 -1000
+++ wrapfunc.inp.new 2019-11-16 22:33:16.000000000 -1000
@@ -197,7 +197,7 @@
mkdirat;int;(int dir_fd, const char *pathname, mode_t mode);(dir_fd,
pathname, mode)
#endif /* HAVE_MKDIRAT */
#ifdef HAVE_OPENAT
-openat;int;(int dir_fd, const char *pathname, int flags, ...);
+openat;int;(int dir_fd, const char *pathname, int flags, ...)
#endif /* HAVE_OPENAT */
#ifdef HAVE_RENAMEAT
renameat;int;(int olddir_fd, const char *oldpath, int newdir_fd, const
char *newpath);(olddir_fd, oldpath, newdir_fd, newpath)
--- libfakeroot.c 2019-11-16 23:23:50.000000000 -1000
+++ libfakeroot.c.new 2019-11-16 23:24:42.000000000 -1000
@@ -2437,6 +2437,7 @@
#ifdef HAVE_OPENAT
int openat(int dir_fd, const char *pathname, int flags, ...)
{
+#undef openat
if (flags & O_CREAT)
{
va_list args;
@@ -2444,8 +2445,9 @@
va_start(args, flags);
mode = va_arg(args, int);
va_end(args);
- return next_openat(dir_fd, pathname, flags, mode);
+ return openat(dir_fd, pathname, flags, mode);
}
- return next_openat(dir_fd, pathname, flags, NULL);
+ return openat(dir_fd, pathname, flags);
+#define openat my_openat
}
#endif
}}}
--
Ticket URL: <https://trac.macports.org/ticket/58296#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list