Index: srtp/crypto/test/kernel_driver.c |
diff --git a/srtp/crypto/test/kernel_driver.c b/srtp/crypto/test/kernel_driver.c |
index c0f12c1027e52470dbb03fcafcadb8567a703814..188637cdc1a8af2dab08eda13a64381348ab2c8c 100644 |
--- a/srtp/crypto/test/kernel_driver.c |
+++ b/srtp/crypto/test/kernel_driver.c |
@@ -48,7 +48,7 @@ |
#endif |
#include <stdio.h> /* for printf() */ |
-#include <unistd.h> /* for getopt() */ |
+#include "getopt_s.h" |
#include "crypto_kernel.h" |
void |
@@ -59,7 +59,6 @@ usage(char *prog_name) { |
int |
main (int argc, char *argv[]) { |
- extern char *optarg; |
int q; |
int do_validation = 0; |
err_status_t status; |
@@ -77,7 +76,7 @@ main (int argc, char *argv[]) { |
/* process input arguments */ |
while (1) { |
- q = getopt(argc, argv, "vd:"); |
+ q = getopt_s(argc, argv, "vd:"); |
if (q == -1) |
break; |
switch (q) { |
@@ -85,9 +84,9 @@ main (int argc, char *argv[]) { |
do_validation = 1; |
break; |
case 'd': |
- status = crypto_kernel_set_debug_module(optarg, 1); |
+ status = crypto_kernel_set_debug_module(optarg_s, 1); |
if (status) { |
- printf("error: set debug module (%s) failed\n", optarg); |
+ printf("error: set debug module (%s) failed\n", optarg_s); |
exit(1); |
} |
break; |