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
 #include <unistd.h>
16
 #include <unistd.h>
17
 #include <string.h>
17
 #include <string.h>
18
 
18
 
19
-#include <openssl/aes.h>
20
-#include <openssl/md5.h>
21
-
22
 #include "libfuncs/libfuncs.h"
19
 #include "libfuncs/libfuncs.h"
23
 
20
 
24
 #include "data.h"
21
 #include "data.h"

+ 0
- 2
camd-newcamd.c View File

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

+ 9
- 0
data.h View File

19
 #include <limits.h>
19
 #include <limits.h>
20
 #include <stdbool.h>
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
 #include <openssl/aes.h>
30
 #include <openssl/aes.h>
23
 #include <openssl/des.h>
31
 #include <openssl/des.h>
24
 #include <openssl/md5.h>
32
 #include <openssl/md5.h>
33
+#include <openssl/rand.h>
25
 
34
 
26
 #include "libfuncs/libfuncs.h"
35
 #include "libfuncs/libfuncs.h"
27
 #include "libtsfuncs/tsfuncs.h"
36
 #include "libtsfuncs/tsfuncs.h"

+ 0
- 2
tsdecrypt.c View File

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

Loading…
Cancel
Save