[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #20235 [Core Tor/Tor]: Configure misidentifies clock_gettime and getentropy on macOS Sierra/XCode8 when compiling for iOS 8
#20235: Configure misidentifies clock_gettime and getentropy on macOS Sierra/XCode8
when compiling for iOS 8
-------------------------------------------------+-------------------------
Reporter: rainwolf | Owner:
Type: defect | Status: new
Priority: Medium | Milestone: Tor:
| 0.2.9.x-final
Component: Core Tor/Tor | Version: Tor:
| 0.2.8.8
Severity: Normal | Resolution:
Keywords: Sierra, XCode 8, clock_gettime, | Actual Points:
getentropy, libSystem.dylib 028-backport osx |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by nickm):
Oh! Hm.
I tried making an example program as small as possible to still use
getentropy():
{{{
#include <sys/types.h>
#include <sys/random.h>
#include <stdio.h>
int main(int argc, char **argv)
{
unsigned x;
if (getentropy(&x, sizeof(x)) < 0)
perror("getentropy");
else
printf("%u\n", x);
return 0;
}
}}}
I tried compiling it in lots of different ways, but I couldn't find a way
to tell gcc to ignore the presence of getentropy()....
{{{
% gcc -Wall -Wl,-no_weak_imports getentropy_test.c -o get
% gcc -Wall -mmacosx-version-min=10.10 -Wl,-no_weak_imports
getentropy_test.c -o get
% ( export MACOSX_DEPLOYMENT_TARGET=10.10 ; gcc -Wall -mmacosx-version-
min=10.10 -Wl,-no_weak_imports getentropy_test.c -o get )
}}}
I wonder if Apple messed up somehow and forgot to tag these APIs as 10.12
only? Or maybe I'm doing something wrong with the above.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20235#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs