mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
63 lines
1.7 KiB
Diff
63 lines
1.7 KiB
Diff
|
From bbb72064b02b04c631b69d428af2dddb3342e769 Mon Sep 17 00:00:00 2001
|
|||
|
From: Michael Weiser <michael.weiser@gmx.de>
|
|||
|
Date: Fri, 19 Aug 2016 10:24:40 +0100
|
|||
|
Subject: [PATCH] Fix test compile time warnings
|
|||
|
MIME-Version: 1.0
|
|||
|
Content-Type: text/plain; charset=UTF-8
|
|||
|
Content-Transfer-Encoding: 8bit
|
|||
|
|
|||
|
A number of tests cause compiler warnings like this:
|
|||
|
|
|||
|
hashcrypt_speed.c: In function ‘hash_data’:
|
|||
|
hashcrypt_speed.c:101:2: warning: implicit declaration of function ‘alarm’ [-Wimplicit-function-declaration]
|
|||
|
alarm(5);
|
|||
|
^~~~~
|
|||
|
hashcrypt_speed.c: In function ‘main’:
|
|||
|
hashcrypt_speed.c:203:2: warning: implicit declaration of function ‘close’ [-Wimplicit-function-declaration]
|
|||
|
close(fdc);
|
|||
|
^~~~~
|
|||
|
|
|||
|
Fix by including unistd.h.
|
|||
|
---
|
|||
|
tests/hashcrypt_speed.c | 1 +
|
|||
|
tests/sha_speed.c | 1 +
|
|||
|
tests/speed.c | 1 +
|
|||
|
3 files changed, 3 insertions(+)
|
|||
|
|
|||
|
diff --git a/tests/hashcrypt_speed.c b/tests/hashcrypt_speed.c
|
|||
|
index e60b73d..2b49f2b 100644
|
|||
|
--- a/tests/hashcrypt_speed.c
|
|||
|
+++ b/tests/hashcrypt_speed.c
|
|||
|
@@ -21,6 +21,7 @@
|
|||
|
#include <stdint.h>
|
|||
|
#include <stdlib.h>
|
|||
|
#include <string.h>
|
|||
|
+#include <unistd.h>
|
|||
|
#include <sys/ioctl.h>
|
|||
|
#include <sys/time.h>
|
|||
|
#include <sys/types.h>
|
|||
|
diff --git a/tests/sha_speed.c b/tests/sha_speed.c
|
|||
|
index e1dc54b..5034b58 100644
|
|||
|
--- a/tests/sha_speed.c
|
|||
|
+++ b/tests/sha_speed.c
|
|||
|
@@ -21,6 +21,7 @@
|
|||
|
#include <stdint.h>
|
|||
|
#include <stdlib.h>
|
|||
|
#include <string.h>
|
|||
|
+#include <unistd.h>
|
|||
|
#include <sys/ioctl.h>
|
|||
|
#include <sys/time.h>
|
|||
|
#include <sys/types.h>
|
|||
|
diff --git a/tests/speed.c b/tests/speed.c
|
|||
|
index 81c5a65..7031fec 100644
|
|||
|
--- a/tests/speed.c
|
|||
|
+++ b/tests/speed.c
|
|||
|
@@ -20,6 +20,7 @@
|
|||
|
#include <stdio.h>
|
|||
|
#include <stdlib.h>
|
|||
|
#include <string.h>
|
|||
|
+#include <unistd.h>
|
|||
|
#include <sys/ioctl.h>
|
|||
|
#include <sys/time.h>
|
|||
|
#include <sys/types.h>
|