Opened 3 weeks ago

Closed 32 hours ago

#57986 closed defect (fixed)

ruby26 @2.6.0: error: use of undeclared identifier 'kSecRandomDefault'

Reported by: ryandesign (Ryan Schmidt) Owned by: kimuraw (kimura wataru)
Priority: Normal Milestone:
Component: ports Version:
Keywords: lion Cc:
Port: ruby26

Description

ruby26 fails to build on Lion:

compiling random.c
random.c:482:18: warning: implicit declaration of function 'SecRandomCopyBytes' is invalid in C99 [-Wimplicit-function-declaration]
    int status = SecRandomCopyBytes(kSecRandomDefault, size, seed);
                 ^
random.c:482:37: error: use of undeclared identifier 'kSecRandomDefault'
    int status = SecRandomCopyBytes(kSecRandomDefault, size, seed);
                                    ^
1 warning and 1 error generated.
make: *** [random.o] Error 1

Apple documentation says SecRandomCopyBytes and kSecRandomDefault are in Lion, but I've previously encountered situations where I had to use the 10.8 SDK in order get their definitions.

Change History (1)

comment:1 Changed 32 hours ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In df640a7f7c0d45021a5f700efa0f4275ff132545/macports-ports (master):

ruby26: fix build on lion

pulls in 10.8 SDK security features so build against
10.8 SDK (available on 10.7 by default)

closes: #57986

Note: See TracTickets for help on using tickets.