pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48435: glib-2.38.x doesn't build on Solaris 10



>Number:         48435
>Category:       pkg
>Synopsis:       glib-2.38.x doesn't build on Solaris 10
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 09 10:50:00 +0000 2013
>Originator:     Uwe Klaus
>Release:        SunOS 5.10 / pkgsrc as of today
>Organization:
>Environment:
SunOS sun5 5.10 Generic_150400-03 sun4u sparc SUNW,SPARC-Enterprise

>Description:
Solaris 10's open doesn't have O_DIRECTORY

  CC       libgio_2_0_la-glocalfile.lo
glocalfile.c: In function 'g_local_file_measure_size_of_file':
glocalfile.c:2702: error: 'O_DIRECTORY' undeclared (first use in this function)
glocalfile.c:2702: error: (Each undeclared identifier is reported only once
glocalfile.c:2702: error: for each function it appears in.)
Makefile:3529: recipe for target 'libgio_2_0_la-glocalfile.lo' failed
gmake[4]: *** [libgio_2_0_la-glocalfile.lo] Error 1
gmake[4]: Leaving directory '/tmp/pkgsrc/devel/glib2/work.l52/glib-2.38.2/gio'

for details and patches see
https://bugzilla.gnome.org/show_bug.cgi?id=708860

>How-To-Repeat:

>Fix:
modify patches/patch-ak

diff patches/patch-ak patches/patch-ak.orig
41,59d40
< @@ -1224,6 +1224,18 @@ AS_IF([test "$ac_cv_func_statfs" = yes], [
<        AC_MSG_ERROR([unable to determine number of arguments to statfs()])])])
<  ])
<  
< +dnl
< +dnl open takes O_DIRECTORY as an option
< +dnl
< +AC_MSG_CHECKING([open() option O_DIRECTORY])
< +AC_TRY_COMPILE([#include <fcntl.h>
< +#include <sys/types.h>
< +#include <sys/stat.h>],
< +[open(0, O_DIRECTORY, 0);],[
< +     AC_MSG_RESULT([yes])
< +     AC_DEFINE(OPEN_O_DIRECTORY, 1, [open option O_DIRECTORY])],[
< +     AC_MSG_RESULT([no])])
< +
<  #
<  # Check whether to use an included printf
<  #



add patches/patch-gio_glocalfile.c
$NetBSD$

--- gio/glocalfile.c    2013-12-09 10:13:57.218324500 +0000
+++ gio/glocalfile.c.orig
@@ -2699,11 +2699,7 @@ g_local_file_measure_size_of_file (gint
         return FALSE;
 
 #ifdef AT_FDCWD
-#ifdef OPEN_O_DIRECTORY
-      dir_fd = openat (parent_fd, name->data, O_RDONLY|O_DIRECTORY);
-#else
-      dir_fd = openat (parent_fd, name->data, O_RDONLY);
-#endif
+      dir_fd = openat (parent_fd, name->data, O_RDONLY | O_DIRECTORY);
       if (dir_fd < 0)
         return g_local_file_measure_size_error (state->flags, errno, name, 
error);
 #endif



Home | Main Index | Thread Index | Old Index