From: geraldo netto <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

test: fix 'implicit declaration of function' by including stdlib, unistd

this patch fixes the following warnings by adding stdlib.h and unistd.h:
/home/netto/Desktop/osv/osv-tomcat9/tests/tst-crypt.c: In function ‘main’:
/home/netto/Desktop/osv/osv-tomcat9/tests/tst-crypt.c:47:3: warning: implicit declaration of function ‘setkey’; did you mean ‘setbuf’? [-Wimplicit-function-declaration]
   setkey(key);
   ^~~~~~
   setbuf
/home/netto/Desktop/osv/osv-tomcat9/tests/tst-crypt.c:50:2: warning: implicit declaration of function ‘encrypt’; did you mean ‘crypt’? [-Wimplicit-function-declaration]
  encrypt(buf, 0);
  ^~~~~~~
  crypt

Signed-off-by: geraldo netto <[email protected]>
Message-Id: <[email protected]>

---
diff --git a/tests/tst-crypt.c b/tests/tst-crypt.c
--- a/tests/tst-crypt.c
+++ b/tests/tst-crypt.c
@@ -1,6 +1,8 @@
 #define _XOPEN_SOURCE
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 #include <crypt.h>

 char* concat_str(char* first_block, char* second_block) {

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to