mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
don't define _POSIX_C_SOURCE in mfd_aes_brute.c if macos
unistd.h in macos has this snippet: #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL #define _SC_NPROCESSORS_CONF 57 #define _SC_NPROCESSORS_ONLN 58 #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ __DARWIN_C_FULL is 900000L. If _POSIX_C_SOURCE gets defined without __DARWIN_C_SOURCE being defined, __DARWIN_C_LEVEL will be assigned to __DARWIN_C_ANSI, which is 010000L. Thus this definition will remove _SC_NPROCESSORS_CONF. If we don't define _POSIX_C_SOURCE, __DARWIN_C_LEVEL will be equal to __DARWIN_C_FULL, and _SC_NPROCESSORS_CONF will be available. This commit also includes homebrew and macports prefix definitions for mfd_aes_brute. Signed-off-by: İlteriş Yağıztegin Eroğlu <ilteris@asenkron.com.tr>
This commit is contained in:
parent
f6ddc56111
commit
87400b6156
2 changed files with 7 additions and 3 deletions
|
@ -22,8 +22,12 @@ ifneq (,$(findstring MINGW,$(platform)))
|
|||
endif
|
||||
|
||||
# OS X needs linking to openssl
|
||||
ifeq ($(platform),Darwin)
|
||||
MYLDFLAGS += -L/usr/local/opt/openssl@3/lib
|
||||
ifeq ($(USE_BREW),1)
|
||||
MYLDFLAGS += -L$(BREW_PREFIX)/opt/openssl@3/lib -L$(BREW_PREFIX)/opt/openssl@1.1/lib
|
||||
endif
|
||||
|
||||
ifeq ($(USE_MACPORTS),1)
|
||||
MYLDFLAGS += -L$(MACPORTS_PREFIX)/lib/openssl-3 -L$(MACPORTS_PREFIX)/lib/openssl-1.1
|
||||
endif
|
||||
|
||||
brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
#define _POSIX_C_SOURCE 200112L // need localtime_r()
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue