[MacPorts] #71265: Adding pthread_[f]chdir_np to legacy-support - contribution guidelines?

MacPorts noreply at macports.org
Fri Nov 8 23:28:03 UTC 2024


#71265: Adding pthread_[f]chdir_np to legacy-support - contribution guidelines?
-------------------------+----------------------------
 Reporter:  RJVB         |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:
 Keywords:               |       Port:  legacy-support
-------------------------+----------------------------
 I have come across an application (not currently in MacPorts; Firefox
 Dynasty for "legacy" systems)  that can make an unprotected call to
 `pthread_chdir_np` or `pthread_fchdir_np`, two functions that were
 introduced in 10.12 but were available as syscalls from 10.5 onwards.

 Based on
 [https://chromium.googlesource.com/chromium/src/+/6eb6d90fa2ce1ff368e7d0088c734a7bc1c8eabd/base/process/launch_mac.cc#96
 old Chromium code] it should be possible to provide these functions on
 10.11 and earlier with a pair of simple wrappers:

 {{{
 int pthread_chdir_np(const char* dir)
 {
   return syscall(SYS___pthread_chdir, dir);
 }

 int pthread_fchdir_np(int fd)
 {
   return syscall(SYS___pthread_fchdir, fd);
 }
 }}}

 I realise `port:legacy-support` is mainly intended for use with MacPorts
 and doesn't aim to provide every possible missing symbol, so I'd be
 perfectly happy with some guidelines or pointers how to add these 2
 wrappers the proper way in a personal fork of the repo (i.e. in such a way
 that they only get included on 10.11 and earlier).

 Reason I'm filing a trac ticket is that there is no dedicated issue
 tracker, and the application in question could make a valuable new port
 for other owners of retro systems (i.e. Firefox v132 that runs on at least
 10.8 and up).


 (I did try to contribute a patch "upstream" but let's just say that my
 efforts weren't appreciated and the maintainer not particularly interested
 in bug reports.)

-- 
Ticket URL: <https://trac.macports.org/ticket/71265>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list