[BACK]Return to patch-gio_inotify_inotify-kernel.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / glib2 / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / glib2 / patches / patch-gio_inotify_inotify-kernel.c (download)

Revision 1.1, Wed Apr 13 10:13:43 2016 UTC (5 years, 7 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2

Use _XOPEN_NAME_MAX in lieu of NAME_MAX for SunOS.

$NetBSD: patch-gio_inotify_inotify-kernel.c,v 1.1 2016/04/13 10:13:43 jperkin Exp $

Use _XOPEN_NAME_MAX in lieu of NAME_MAX for SunOS.

--- gio/inotify/inotify-kernel.c.orig	2016-02-23 22:25:36.000000000 +0000
+++ gio/inotify/inotify-kernel.c
@@ -36,6 +36,9 @@
 #include "glib-private.h"
 
 /* From inotify(7) */
+#if !defined(NAME_MAX) && defined(_XOPEN_NAME_MAX)
+#define NAME_MAX             _XOPEN_NAME_MAX
+#endif
 #define MAX_EVENT_SIZE       (sizeof(struct inotify_event) + NAME_MAX + 1)
 
 /* Amount of time to sleep on receipt of uninteresting events */