changeset 856:e93ae8a32a26

ifconfig uses __caddr_t in one location; this is not guaranteed to work everywhere. It does not compile OOB on musl, so I changed it to the portable equivalent, char *. This compiles on musl, and should compile anywhere.
author Isaac Dunham <idunham@lavabit.com>
date Sun, 14 Apr 2013 02:58:12 -0500
parents 88060f1ff4a4
children da601285a86e
files toys/pending/ifconfig.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/pending/ifconfig.c	Fri Apr 12 20:12:02 2013 -0500
+++ b/toys/pending/ifconfig.c	Sun Apr 14 02:58:12 2013 -0500
@@ -603,7 +603,7 @@
   unsigned long val = strtoul(kval, NULL, 0);
   char *ptr;
   ptr = ((char *) ifre) + offsetof(struct ifreq, ifr_data);
-  (*(__caddr_t *)ptr) = (__caddr_t)val;
+  (*(char * *)ptr) = (char *)val;
 
   if(ioctl(sockfd, request, ifre) < 0) {
     perror_exit((char *)req_name);