Skip to content

Commit

Permalink
Prevent openssl warnings when build on OS X >= 10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Chorbadzhiyski committed Jan 27, 2015
1 parent 19aadf5 commit bc8ba10
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 0 additions & 3 deletions camd-cs378x.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#include <unistd.h>
#include <string.h>

#include <openssl/aes.h>
#include <openssl/md5.h>

#include "libfuncs/libfuncs.h"

#include "data.h"
Expand Down
2 changes: 0 additions & 2 deletions camd-newcamd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#include <string.h>
#include <unistd.h>

#include <openssl/des.h>

#include "libfuncs/libfuncs.h"

#include "data.h"
Expand Down
9 changes: 9 additions & 0 deletions data.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@
#include <limits.h>
#include <stdbool.h>

// Prevent warnings about openssl functions. Apple may consider 'openssl'
// deprecated but changing perfectly working portable code just because they
// introduced some proprietary API is not going to happen.
#if defined(__APPLE__)
#define __AVAILABILITY_MACROS_USES_AVAILABILITY 0
#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_6
#endif

#include <openssl/aes.h>
#include <openssl/des.h>
#include <openssl/md5.h>
#include <openssl/rand.h>

#include "libfuncs/libfuncs.h"
#include "libtsfuncs/tsfuncs.h"
Expand Down
2 changes: 0 additions & 2 deletions tsdecrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
#include <syslog.h>
#include <sys/resource.h>

#include <openssl/rand.h>

#include "libfuncs/libfuncs.h"

#include "data.h"
Expand Down

0 comments on commit bc8ba10

Please sign in to comment.