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.
--
Isaac Dunham <[email protected]>
diff --git a/toys/pending/ifconfig.c b/toys/pending/ifconfig.c
index d5aa21e..605275d 100644
--- a/toys/pending/ifconfig.c
+++ b/toys/pending/ifconfig.c
@@ -603,7 +603,7 @@ static void set_data(int sockfd, struct ifreq *ifre, char *kval, int request, ch
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);
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net