Wireshark-bugs: [Wireshark-bugs] [Bug 3307] New: Wireshark won't compile with Sun Studio 12 with

Date: Fri, 6 Mar 2009 06:50:55 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3307

           Summary: Wireshark won't compile with Sun Studio 12 with enabled
                    CC99 (-xc99=all)
           Product: Wireshark
           Version: 1.0.6
          Platform: PC
        OS/Version: Solaris
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: petr.sumbera@xxxxxxx


Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--
/opt/SUNWspro/SS12/bin/cc -DHAVE_CONFIG_H -I.  -I. -I./wiretap  -I/usr/include
-I/usr/include    -I/usr/include/kerberosv5
'-DPLUGIN_DIR="/usr/lib/wireshark/plugins/1.0.6"'  -D_U_="" -xO3 -m32
-xarch=sparc -xspace -W0,-Lt -Xa  -xildoff -xc99=all -W2,-xwrap_int
-I/usr/include/pcre -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_PTHREADS
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/X11/include
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12   -I/usr/include/kerberosv5 -c
text2pcap.c                 
"/usr/include/sys/feature_tests.h", line 353: #error: "Compiler or options
invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications"
cc: acomp failed for text2pcap.c

Following quick surgery will help:

--- text2pcap.c.orig    Fri Feb 20 02:09:04 2009
+++ text2pcap.c Fri Feb 20 02:09:33 2009
@@ -86,6 +86,7 @@
  * (needed for glibc 2.2) but make sure we do this only if not
  * yet defined.
  */
+#if 0
 #ifndef __USE_XOPEN
 #  define __USE_XOPEN
 #endif
@@ -92,6 +93,7 @@
 #ifndef _XOPEN_SOURCE
 #  define _XOPEN_SOURCE
 #endif
+#endif

 #include <ctype.h>
 #include <stdio.h>


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.