! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
exo-mount-point.c does not compile on solaris 2.8
Status:
CLOSED: DUPLICATE

Comments

Description Thomas Wiegner 2007-01-23 13:58:13 CET
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.1) Gecko/20061024 Firefox/2.0
Build Identifier: 

exo-mount-point.c does not compile on solaris 2.8 due to 2 reasons.

1.) the setmntent function is used, although it does not exist on solaris 2.8.
2.) solaris 2.8 needs the stdio.h included before mntent.h is included.

Here is a patch to fix this:

--------------------------------------------->

--- exo-mount-point.c_old       2007-01-22 12:09:13.545343000 +0100
+++ exo-mount-point.c   2007-01-23 13:06:08.825124000 +0100
@@ -22,6 +22,9 @@
 #include <config.h>
 #endif

+#include <stdlib.h>
+#include <stdio.h>
+
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -50,9 +53,6 @@
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
-#ifdef HAVE_MNTENT_H
-#include <mntent.h>
-#endif
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 #endif
@@ -63,6 +63,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_MNTENT_H
+#include <mntent.h>
+#endif

 #include <exo/exo-mount-point.h>
 #include <exo/exo-private.h>
@@ -227,7 +230,7 @@
   FILE         *fp;

   /* try to open the /etc/mnttab file */
-  fp = setmntent ("/etc/mnttab", "r");
+  fp = fopen ("/etc/mnttab", "r");
   if (G_UNLIKELY (fp == NULL))
     {
       g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),



<-----------------------------------------

Reproducible: Always

Steps to Reproduce:
Comment 1 Thomas Wiegner 2007-01-23 14:03:19 CET
This is an exact duplicate of bug 2798, sorry, must have done 
something wrong in my browser.

*** This bug has been marked as a duplicate of bug 2798 ***

Bug #2800

Reported by:
Thomas Wiegner
Reported on: 2007-01-23
Last modified on: 2009-10-09

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

Additional information