Conflicting gethostname function definition on Solaris 9

J

John Ky

Hello:

Building Python works fine. Now I am trying to build my own python
module on Solaris 9, but I'm getting the following conflict:

In file included from
/wrk/src/test/tools/local/include/python2.2/Python.h:62,
from elxml.cpp:20:
/wrk/src/test/tools/local/include/python2.2/pyport.h:333: declaration
of C function `int gethostname(char*, int)' conflicts with
/usr/include/unistd.h:274: previous declaration `int gethostname(char*, long
unsigned int)' here

Did I do something wrong?

Thanks

-John
 
J

John Ky

To work around this, I had to do two things:

1. not defined "SOLARIS"
2. put "python.h" first in the header file.
 
J

John Ky

John Ky said:
To work around this, I had to do two things:

1. not defined "SOLARIS"
2. put "python.h" first in the header file.

Oops - I meant include "python.h" first before any other header
from my *.cpp file.

-John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top