[Bug 2463] Conflict with openbsd compat glob() function in shared libraries
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Wed Sep 16 13:46:51 AEST 2015
https://bugzilla.mindrot.org/show_bug.cgi?id=2463
Darren Tucker <dtucker at zip.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #2704| |ok-
Flags| |
--- Comment #2 from Darren Tucker <dtucker at zip.com.au> ---
Comment on attachment 2704
--> https://bugzilla.mindrot.org/attachment.cgi?id=2704
reworked patch in cleaner way
> int
> remote_glob(struct sftp_conn *conn, const char *pattern, int flags,
>- int (*errfunc)(const char *, int), glob_t *pglob)
>+ int (*errfunc)(const char *, int), GLOB_COMPAT(glob_t) *pglob)
Requiring changes like that to the mainline code will be an ongoing
maintenance disaster. Lots of diffs won't apply when syncing changes,
and there's the risk one *does* but doesn't get the required change,
becoming a potential landmine for someone to stumble over later.
I'd rather see this done with the preprocessor only and in the compat
code only. As long as nothing pulls in the system glob.h, something
along the lines of this ought to work:
#define glob_t compat_glob_t
#define glob(a, b, c, d) __compat_glob((a), (b), (c), (d))
and you may not even need to #define the flags, maybe checking they're
not already defined (ie nothing picked up the system glob.h) may be
sufficient.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list