Solaris build patches

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

 



This is to fix a number of build problems under Solaris. There still appears to be a problem with ptrace in the server code that is preventing a build. I am looking at this.

alan.
=========


Alan Hargreaves - Alan.Hargreaves@Sun.COM


wine/dlls/ntdll/signal_i386.c
	Bug 1569
	- Cast needed for FAULT_ADDRESS in Solaris

wine/dlls/iphlpapi/ifenum.c
	Bug 1572
	- Brace in incorrect place makes an if else clause malformed
	- struct ifreq has been deprecated in Solaris and also does
	  not have an element for ifr_mtu. Inserted a replacement
	  getInterfaceMtuByName if __sun is defined. This version uses
	  struct lifreq.
	- Solaris does not implement getInterfaceAddrByName. Added this
	  routine to be used if __sun is defined.

Index: wine/dlls/iphlpapi/ifenum.c
===================================================================
RCS file: /home/wine/wine/dlls/iphlpapi/ifenum.c,v
retrieving revision 1.3
diff -r1.3 ifenum.c
617a618,645
> #ifdef __sun
> 
> /* Solaris does not define getInterfaceAddrByName */
> 
> uint32_t getInterfaceAddrByName(const char * name)
> {
>   int fd;
>   struct ifreq ifr;
>   struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr;
>   uint32_t ret = (uint32_t)NULL;
> 
>   fd = socket(PF_INET, SOCK_DGRAM, 0);
> 
>   if (fd < 0) {
>     return ret;
>   }
> 
>   memset(&ifr, 0, sizeof(struct ifreq));
>   strncpy(ifr.ifr_name, name, IFNAMSIZ);
>   ifr.ifr_name[IFNAMSIZ-1] = '\0';
>   if ((ioctl(fd, SIOCGIFADDR, &ifr))>=0) {
>     ret = ntohl(sin->sin_addr.s_addr);
>   }
>   close(fd);
>   return ret;
> }
> #endif /* __sun */
> 
664,665d691
<     else
<       ret = ERROR_NO_MORE_FILES;
666a693,694
>   else
>     ret = ERROR_NO_MORE_FILES;
770a799,830
> #if defined(__sun)
> 
> DWORD getInterfaceMtuByName(const char *name, PDWORD mtu)
> {
>   DWORD ret;
>   int fd;
> 
>   if (!name)
>     return ERROR_INVALID_PARAMETER;
>   if (!mtu)
>     return ERROR_INVALID_PARAMETER;
> 
>   fd = socket(PF_INET, SOCK_DGRAM, 0);
>   if (fd != -1) {
>     struct lifreq ifr;
> 
>     strncpy(ifr.lifr_name, name, IFNAMSIZ);
>     ifr.lifr_name[IFNAMSIZ-1] = '\0';
>     if ((ioctl(fd, SIOCGIFMTU, &ifr)))
>       ret = ERROR_INVALID_DATA;
>     else {
>       *mtu = ifr.lifr_mtu;
>       ret = NO_ERROR;
>     }
>   }
>   else
>     ret = ERROR_NO_MORE_FILES;
>   return ret;
> }
> 
> #else /* defined(__sun) */
> 
797a858
> #endif
Index: wine/dlls/ntdll/signal_i386.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/signal_i386.c,v
retrieving revision 1.66
diff -r1.66 signal_i386.c
370a371,373
> #ifdef __sun
> #define FAULT_ADDRESS         (((k_siginfo_t *)__siginfo)->si_addr)
> #else
371a375
> #endif

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux