- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: syntax error in /usr/include/sys/socket.h
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2003 06:48 AM
тАО07-30-2003 06:48 AM
FYI - I'm using gcc 3.2.3 from the HP-UX Porting and Archive Centre for HP-UX 11.0 PA-RISC on a HP-UX 11.11 machine. And I need to build a 32-bit application.
Compiling my application, I get the following errors:
/usr/include/sys/socket.h:439: syntax error before `(' token
/usr/include/sys/socket.h:441: syntax error before `(' token
There are already several postings on this error in the forum. Mostly the error shows up when building some open source appl and the solution is to use a succesful built version. I've also tried the tip to add "-I/usr/include", but it didn't work in my case.
To me it seems that there is in fact a bug in /usr/include/sys/types.h which becomes effective in socket.h?! Therefore, where can I get a fixed types.h? Or what do I have to change in types.h to get "my own one" for building my application? Or any other idea how to solve/bypass this error?
Thanks in advance for your help.
Regina
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-30-2003 07:05 AM
тАО07-30-2003 07:05 AM
Re: syntax error in /usr/include/sys/socket.h
IIRC gcc requires 'modified' versions of things like types.h.
These get installed somewhere in the directory structure which is created when you install gcc.
As a consequence, you need to make sure that the /usr/include/ files are searched after the gcc versions.
HTH,
Michael.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2003 01:00 AM
тАО07-31-2003 01:00 AM
Re: syntax error in /usr/include/sys/socket.h
thanks for your reply - but can you tell me how to make sure, that the gcc include-files are used?
I was compiling with "-I
Initially I tried to use "fixincludes" of gcc, but the gcc 3.2.3 binary package doesn't include a fixincludes skript (or even a fixinc* something file/skript).
Thanks
Regina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2003 01:01 AM
тАО07-31-2003 01:01 AM
Solutioncp /usr/include/sys/socket.h /usr/local/include/sys/socket.h
vi /usr/local/include/sys/socket.h
Add the following lines near the top of the file, just after the #include's:
typedef int64_t sbsize_t; /* signed length in bytes */
typedef uint64_t bsize_t; /* unsigned length in bytes */
typedef int64_t sbsize64_t;
typedef uint64_t bsize64_t;
Gcc should look in /usr/local/include first so the modified socket.h should be picked up. If you ever install any patches that update socket.h make sure you update the new file as well!
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2003 01:23 AM
тАО07-31-2003 01:23 AM
Re: syntax error in /usr/include/sys/socket.h
(to make the solution a bit "cleaner", I guess I'll create a separate appl-specific header-file, which is included between sys/types.h and sys/socket.h)
Regina