8bitbubsy / pt2-clone

ProTracker 2 clone for Windows/macOS/Linux
https://16-bits.org
BSD 3-Clause "New" or "Revised" License
458 stars 33 forks source link

Build fails on Solaris because dt_type isn't part of the POSIX standard. #24

Closed AnnatarTheMaia closed 1 year ago

AnnatarTheMaia commented 2 years ago

src/pt2_diskop.c: In function 'findFirst': src/pt2_diskop.c:175:27: error: 'struct dirent' has no member named 'd_type' 175 | searchRec->isDir = (fData->d_type == DT_DIR) ? true : false; | ^~ src/pt2_diskop.c:175:39: error: 'DT_DIR' undeclared (first use in this function) 175 | searchRec->isDir = (fData->d_type == DT_DIR) ? true : false; | ^~ src/pt2_diskop.c:175:39: note: each undeclared identifier is reported only once for each function it appears in src/pt2_diskop.c:177:11: error: 'struct dirent' has no member named 'd_type' 177 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~ src/pt2_diskop.c:177:23: error: 'DT_UNKNOWN' undeclared (first use in this function); did you mean 'SDLK_UNKNOWN'? 177 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~~~~~ | SDLK_UNKNOWN src/pt2_diskop.c:177:42: error: 'struct dirent' has no member named 'd_type' 177 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~ src/pt2_diskop.c:177:54: error: 'DT_LNK' undeclared (first use in this function) 177 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~ src/pt2_diskop.c: In function 'findNext': src/pt2_diskop.c:255:27: error: 'struct dirent' has no member named 'd_type' 255 | searchRec->isDir = (fData->d_type == DT_DIR) ? true : false; | ^~ src/pt2_diskop.c:255:39: error: 'DT_DIR' undeclared (first use in this function) 255 | searchRec->isDir = (fData->d_type == DT_DIR) ? true : false; | ^~ src/pt2_diskop.c:257:11: error: 'struct dirent' has no member named 'd_type' 257 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~ src/pt2_diskop.c:257:23: error: 'DT_UNKNOWN' undeclared (first use in this function); did you mean 'SDLK_UNKNOWN'? 257 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~~~~~ | SDLK_UNKNOWN src/pt2_diskop.c:257:42: error: 'struct dirent' has no member named 'd_type' 257 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~ src/pt2_diskop.c:257:54: error: 'DT_LNK' undeclared (first use in this function) 257 | if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK) | ^~

AnnatarTheMaia commented 2 years ago

Patch can be accessed here:

https://gist.github.com/AnnatarTheMaia/76cc1afbc9afac817f641bf693b88ebf

8bitbubsy commented 1 year ago

This has been fixed, forgot to update this issue.