Fix 2013/cable3 for modern systems

The code declares localtime() to be a different type than what time.h
has which was included with macOS and thus it caused a compilation
error. Instead use #undef localtime (I tried to remove the prototype and
let time.h do its thing but this caused a segfault and since this works
I opted for it .. for now at least).

It also did not link in any system because it uses SDL functions that
were removed from SDL2 so sdl-config has to be used instead of
sdl2-config.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-24 13:16:24 -07:00
1 parent 190b7351d7
commit 9264bcf0d1
3 files changed
+11 -3

No files matched your search

+8
View File
@@ -15,6 +15,14 @@ make
./cable3 bios-image-file floppy-image-file [harddisk-image-file]
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to compile
with modern systems. The problem is that `localtime()` is used differently and
`time.h` being included there was a conflicting function type. This appeared to
be a problem with macOS. The other problem is that this entry uses SDL functions
that were removed from SDL2 so the Makefile has to use `sdl-config` and not
`sdl2-config`. Thank you Cody for your assistance!
### Try:
```sh