Re: pkg/60203: devel/glib2 build breaks on netbsd-9

Makoto Fujiwara <[email protected]> Thu, 23 Apr 2026 21:02:16 +0900
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <[email protected]>
If we change the patch 
as attached, it will package:

This patch sounds crazy. And I don't figure out why
  #define _NETBSD_SOURCE 
does not affect to fcntl.h

Sorry for noise
-- 
Makoto Fujiwara
[email protected]
[email protected]
-------------------------------------------------------------------
$NetBSD: patch-glib_glib-unix.c,v 1.1 2026/04/15 08:33:00 adam Exp $

Fix build on NetBSD.

--- glib/glib-unix.c.orig	2026-03-16 22:53:50.000000000 +0900
+++ glib/glib-unix.c	2026-04-23 20:54:52.524792612 +0900
@@ -46,9 +46,14 @@
 
 #include <dirent.h>
 #include <errno.h>
+#define _NETBSD_SOURCE
 #include <fcntl.h>
+#ifndef F_GETPATH
+#define F_GETPATH       15
+#endif
 #include <stdlib.h>   /* for fdwalk */
 #include <string.h>
+#include <sys/param.h> /* for MAXPATHLEN */
 #include <sys/types.h>
 #include <pwd.h>
 #include <unistd.h>