vijayyande / spserver

Automatically exported from code.google.com/p/spserver
Other
0 stars 0 forks source link

Unable to compile in Mac OS X v10.4.10 #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download spserver-0.8.5.src.tar.gz
2. Follow installation/compilation instructions in spserver/README
3. View compilation error after typing 'make'

What is the expected output? What do you see instead?
I expected the project to compile, but arrived at the following compilation
error:
avacado:~/software/srelos/spserver-0.8.5/spserver inajam$ make
gcc -Wall -D_REENTRANT -D_GNU_SOURCE -g -fPIC
-I/Users/inajam/software/srelos/libevent-1.3e/build/include -c
spioutils.cpp -o spioutils.o
spioutils.cpp: In static member function 'static void
SP_IOUtils::inetNtoa(in_addr*, char*, int)':
spioutils.cpp:25: error: 'struct in_addr' has no member named 's_net'
spioutils.cpp:25: error: 'struct in_addr' has no member named 's_host'
spioutils.cpp:25: error: 'struct in_addr' has no member named 's_lh'
spioutils.cpp:25: error: 'struct in_addr' has no member named 's_impno'
make: *** [spioutils.o] Error 1

What version of the product are you using? On what operating system?
I'm using spserver v0.8.5, and Mac OS X v10.4.10

Please provide any additional information below.
I looked @ spioutils.cpp and tried to locate what definition of struct
in_addr it was using.  It appears (as best I can find) that it's accessing
the in_addr defined on OS X in /usr/include/netinet/in.h, which looks like
this:

/*
 * Internet address (a structure for historical reasons)
 */
struct in_addr {
        in_addr_t s_addr;
};

This would explain why compiling spserver on OS X fails as mentioned above.

spserver is actually exactly what I'm looking for to embed an HTTP server
in an existing c++ component.  I'll try to get access to a Linux machine to
see if compilation behaves differently there.

Original issue reported on code.google.com by joeym...@gmail.com on 31 Oct 2007 at 3:26

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Patch from Brian O'Kelley

< #if defined(__APPLE__)
<       #include <sys/uio.h>
< #endif

< #if defined (linux) || defined (__sgi) || defined (__hpux) || defined 
(__FreeBSD__)
|| defined (__APPLE__) 
---
> #if defined (linux) || defined (__sgi) || defined (__hpux) || defined 
(__FreeBSD__)

Original comment by liusi...@gmail.com on 1 Nov 2007 at 3:48

GoogleCodeExporter commented 9 years ago
Makefile for OS X from Brian O'Kelley

Original comment by liusi...@gmail.com on 1 Nov 2007 at 3:49

Attachments:

GoogleCodeExporter commented 9 years ago
Makefile.darwin was added.

Original comment by stephen....@gmail.com on 24 Sep 2008 at 3:19