OpenCBM / nibtools

git mirror of nibtools (https://github.com/rittwage/nibtools.git, old: https://c64preservation.com/dp.php?pg=nibtools)
https://github.com/rittwage/nibtools.git
18 stars 10 forks source link

Compile fix for modern header check/guards - nibtools will not compile without defining _DEFAULT_SOURCE #7

Closed UffeJakobsen closed 23 hours ago

UffeJakobsen commented 6 months ago

PS: I know this is a read-only mirror - but pushing this PR will make it easier to referenceing to this issue on traditional email error reports

/Uffe

Compile fix for modern header check/guards - nibtools will not compile without defining _DEFAULT_SOURCE

Error below:

In file included from read.c:12:
read.c: In function ‘TrackAlignmentReport’:
include/LINUX/mnibarch.h:4:19: error: implicit declaration of function ‘usleep’; did you mean ‘sleep’? [-Wimplicit-function-declaration]
    4 | #define delay(x)  usleep((x) * 1000)
      |                   ^~~~~~
read.c:629:33: note: in expansion of macro ‘delay’
  629 |                                 delay(500);
      |                                 ^~~~~
make[2]: *** [<builtin>: read.o] Error 1
UffeJakobsen commented 6 months ago

Problem is seen with Archlinux and latest headers and GCC 14.1.1

UffeJakobsen commented 5 months ago

Cross-reported here:

https://sourceforge.net/p/opencbm/patches/26/

spiro-trikaliotis commented 5 months ago

Please note that SF is a read-only copy of the repository, and the bug tracking there is also dead. I moved everything here.

That being said, Peter is not available here. You wrote that you already send him an e-mail. I think we have to bother him again.

spiro-trikaliotis commented 23 hours ago

This problem has been handled with commit 97eafd2.

I totally forgot about this PR and created my own patch, giving it to Pete.