Re: building csound from source - OOps/remote.c:70: error: storage size of 'ifr' isn't known

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't think this is my problem, but I don't know why io.h is not found:

Checking for C header file io.h... (cached) no

does that mean that it's not cached, or it's not found? It's in my
/usr/include/sys directory, and other C headers are found.

Is this normal? Or not?

brad

On Mon, Jul 7, 2008 at 1:47 PM, Brad Fuller <bradallenfuller@xxxxxxxxx> wrote:
> I think this is strictly a csound build error -- I probably didn't set
> something correctly (which I set nothing), but I can't find out what
> it is. Before I go delving into this, I'm sure someone can tell me
> what I didn't set right..
>
> To compile is just:
>
> # scons
>
> The error:
> ===
> OOps/remote.c: In function 'getIpAddress':
> OOps/remote.c:70: error: storage size of 'ifr' isn't known
> scons: *** [OOps/remote.o] Error 1
> scons: building terminated because of errors.
> ===
>
> I'm compiling on Linux 64_x86. The error, I suppose, shows up in the
> strcpy below (from remote.c):
>
>
> #ifdef HAVE_SOCKETS
>
>  /* get the IPaddress of this machine */
> static int getIpAddress(char *ipaddr, char *ifname)
> {
>   int ret = 1;
> #ifdef WIN32
>   /* VL 12/10/06: something needs to go here */
>   /* gethostbyname is the real answer; code below id unsafe */
>   char hostname[1024];
>   struct hostent *he;
>   struct sockaddr_in sin;
>   gethostname(hostname, sizeof(hostname));
>   he = gethostbyname(hostname);
>
>   memset(&sin, 0, sizeof (struct sockaddr_in));
>   memmove(&sin.sin_addr, he->h_addr_list[0], he->h_length);
>   strcpy(ipaddr, inet_ntoa (sin.sin_addr));
>   ret = 0;
>
> #else
>   struct ifreq ifr;
>   int fd;
>
>   fd = socket(AF_INET,SOCK_DGRAM, 0);
>   if (fd >= 0) {
>     strcpy(ifr.ifr_name, ifname);
>
>     if (ioctl(fd, SIOCGIFADDR, &ifr) == 0) {
>       char *local;
>       local = inet_ntoa(((struct sockaddr_in *)(&ifr.ifr_addr))->sin_addr);
>       strcpy(ipaddr, local);
>       ret = 0;
>     }
>   }
>   close(fd);
> #endif
>   return ret;
>
>
> Brad Fuller wrote:
>>
>> Trying to build C5.08 on gentoo so that I can build the java wrapper
>> (to try AVSynthesis). Rcv'd the following error. Google turns up only
>> one search that didn't help.
>>
>> usr/X11R6/include OOps/remote.c
>> OOps/remote.c: In function 'getIpAddress':
>> OOps/remote.c:70: error: storage size of 'ifr' isn't known
>> scons: *** [OOps/remote.os] Error 1
>> scons: building terminated because of errors.
>>
>>
>> I thought maybe it was that I emerged SWIG w/o a 'java' or 'python',
>> but I set those flags and no change.
>>
>> or,
>>
>> if there is a way to create a java wrapper using gentoo USE flags,
>> that's much easier (I'm using the proaudio overlay). I set java USE
>> flag, but it didn't create the java wrapper. That lead me to compile
>> from 5.08 source.
>>
>> thanks much!
>>
>> brad
>
>



-- 
Brad Fuller
www.bradfuller.com
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux