PDP-10/its

Building pdp6 emumulator on macOS Sonoma 14.5 fails

Opened this issue · 2 comments

Attempting to build the pdp6 emulator on macOS Sonoma (14.5) fails with two errors.

joy.c:132:4: error: call to undeclared function 'close'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                        close(fd);
                        ^
1 error generated.

and

threading.c:216:37: error: too many arguments to function call, expected 1, have 2
        pthread_setname_np(pthread_self(), name);
        ~~~~~~~~~~~~~~~~~~                 ^~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:535:5: note: 'pthread_setname_np' declared here
int     pthread_setname_np(const char*);
        ^
1 error generated.

On macOS, pthread_setname_np() only takes one parameter, the const char* name parameter.

And the declaration of close() is in unistd.h.

The first part was already addressed here: aap/pdp6#29

When this has been fixed, the submodule should be updated along with others: #2321