MantisBT - Buildsystem
View Issue Details
0002824Buildsystem[All Projects] Generalpublic2021-06-05 22:392021-06-05 22:39
ReporterJoão 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
PlatformOSGNU/HurdOS Version
Fixed in CI build #
Reported in CI build #
Summary0002824: Porting to GNU/Hurd
DescriptionNetsurf 3.10 does not build on GNU/Hurd due to 2 documented issues:
GNU/Hurd uses the mach kernel but is not Apple and can use function clock_gettime()
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#mach_darwin

The macro PATH_MAX is not defined in POSIX and is not present in GNU/Hurd
https://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL

The attached patch addresses these two issues. For the latter case, the string size is allocated dynamically using functions of the asprinf() family and realpath() called with the NULL argument. I don't know if these functions are present and work as intended on all platforms that Netsurf builds on. If this patch creates problems for other OS, would you consider using the Gnulib functions?
https://www.gnu.org/software/gnulib/manual/html_node/asprintf.html
https://www.gnu.org/software/gnulib/manual/html_node/realpath.html

The patch was created against version 3.10 on Debian.

With this patch, the functions filepath_find() and filepath_sfind() have become pretty much equivalent. I have not suppressed either to keep the patch minimal and to let you decide what you would like to do.
TagsNo tags attached.
Attached Filespatch fix_ftbfs_hurd.patch (13,179) 2021-06-05 22:39
https://bugs.netsurf-browser.org/mantis/file_download.php?file_id=708&type=bug

There are no notes attached to this issue.

Issue History
2021-06-05 22:39JoãoNew Issue
2021-06-05 22:39JoãoFile Added: fix_ftbfs_hurd.patch