PDP-10 / its

Incompatible Timesharing System
Other
868 stars 84 forks source link

Building pdp6 emumulator on macOS Sonoma 14.5 fails #2317

Closed eswenson1 closed 2 days ago

eswenson1 commented 4 months ago

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.
eswenson1 commented 3 months ago

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

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

larsbrinkhoff commented 3 months ago

The first part was already addressed here: https://github.com/aap/pdp6/pull/29

When this has been fixed, the submodule should be updated along with others: https://github.com/PDP-10/its/issues/2321

larsbrinkhoff commented 2 days ago

I'm closing this because there already is an issue to update the pdp6 emulator, #2321. Any needed updates to the emulator should be submitted there.