Browse Source

Prevent openssl warnings when build on OS X >= 10.7

Georgi Chorbadzhiyski 9 years ago
parent
commit
bc8ba10650
4 changed files with 9 additions and 7 deletions
  1. 0
    3
      camd-cs378x.c
  2. 0
    2
      camd-newcamd.c
  3. 9
    0
      data.h
  4. 0
    2
      tsdecrypt.c

+ 0
- 3
camd-cs378x.c View File

@@ -16,9 +16,6 @@
16 16
 #include <unistd.h>
17 17
 #include <string.h>
18 18
 
19
-#include <openssl/aes.h>
20
-#include <openssl/md5.h>
21
-
22 19
 #include "libfuncs/libfuncs.h"
23 20
 
24 21
 #include "data.h"

+ 0
- 2
camd-newcamd.c View File

@@ -19,8 +19,6 @@
19 19
 #include <string.h>
20 20
 #include <unistd.h>
21 21
 
22
-#include <openssl/des.h>
23
-
24 22
 #include "libfuncs/libfuncs.h"
25 23
 
26 24
 #include "data.h"

+ 9
- 0
data.h View File

@@ -19,9 +19,18 @@
19 19
 #include <limits.h>
20 20
 #include <stdbool.h>
21 21
 
22
+// Prevent warnings about openssl functions. Apple may consider 'openssl'
23
+// deprecated but changing perfectly working portable code just because they
24
+// introduced some proprietary API is not going to happen.
25
+#if defined(__APPLE__)
26
+#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
27
+#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
28
+#endif
29
+
22 30
 #include <openssl/aes.h>
23 31
 #include <openssl/des.h>
24 32
 #include <openssl/md5.h>
33
+#include <openssl/rand.h>
25 34
 
26 35
 #include "libfuncs/libfuncs.h"
27 36
 #include "libtsfuncs/tsfuncs.h"

+ 0
- 2
tsdecrypt.c View File

@@ -24,8 +24,6 @@
24 24
 #include <syslog.h>
25 25
 #include <sys/resource.h>
26 26
 
27
-#include <openssl/rand.h>
28
-
29 27
 #include "libfuncs/libfuncs.h"
30 28
 
31 29
 #include "data.h"

Loading…
Cancel
Save