Fix compile errors with MacOS (#312)

* Fix compile errors with MacOS
- _POSIX_C_SOURCE must not be defined for num_CPU()

* separate util_posix.c require changes in tools directory as well

* remove unnecessary self-include
This commit is contained in:
pwpiwi 2017-06-07 22:35:20 +02:00 committed by GitHub
parent f9a12dfac2
commit ec9c71129f
17 changed files with 109 additions and 59 deletions

View file

@ -4,7 +4,7 @@ LD = gcc
CFLAGS = -std=c99 -D_ISOC99_SOURCE -I../../common -I../../client -Wall -O3
LDFLAGS =
OBJS = crypto1.o crapto1.o parity.o util.o mfkey.o
OBJS = crypto1.o crapto1.o parity.o util_posix.o mfkey.o
EXES = mfkey32 mfkey64
WINEXES = $(patsubst %, %.exe, $(EXES))

View file

@ -4,7 +4,8 @@
#include <stdlib.h>
#include "crapto1/crapto1.h"
#include "mfkey.h"
#include "util.h"
#include "util_posix.h"
// 32 bit recover key from 2 nonces
int main (int argc, char *argv[]) {

View file

@ -2,7 +2,7 @@
#include <string.h>
#include <inttypes.h>
#include "crapto1/crapto1.h"
#include "util.h"
#include "util_posix.h"
int main (int argc, char *argv[])
{