- fix warnings for missing prototypes - use termios instead of sgtty (why doesn't this work on amd64?)
22 lines
584 B
Text
22 lines
584 B
Text
$NetBSD: patch-ae,v 1.4 2008/12/17 02:19:59 christos Exp $
|
|
|
|
--- icb/getswitch.c.orig 1995-02-24 16:20:22.000000000 -0500
|
|
+++ icb/getswitch.c 2008-12-16 20:18:01.000000000 -0500
|
|
@@ -1,6 +1,8 @@
|
|
#include <stdio.h>
|
|
#include <strings.h>
|
|
#include <string.h>
|
|
+#include <stdlib.h>
|
|
+#include <unistd.h>
|
|
|
|
/* getswitch - parse multicharacter option arguments.
|
|
*/
|
|
@@ -43,7 +45,7 @@
|
|
if (thisswitch != retswitch)
|
|
free(thisswitch);
|
|
|
|
- thisswitch = (char *)malloc(strlen(*switchv)+1);
|
|
+ thisswitch = malloc(strlen(*switchv)+1);
|
|
strcpy(thisswitch, *switchv);
|
|
length = strlen(arg);
|
|
|