Compile fix for modern header check/guards - nibtools will not compile...
Brought to you by:
strik
Compile fix for modern header check/guards - nibtools will not compile without defining _DEFAULT_SOURCE
Compiling nibtools on modern linux'es (ArchLinux) will not compile without defining _DEFAULT_SOURCE due to the 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
About 1 months ago I made a PR on the read-only github mirror of nobtools - and informed Peter in an about the PR:
https://github.com/OpenCBM/nibtools/pull/7
Just received a "Thanks" reply
To be honest I'm not really sure where the "original" nibtools is living anymore (and where to report issues and patches) - but for now I'll try this approach
BR/Uffe :-)
Anonymous
Hello Uffe,
thank you again for your continuous support.
Indeed, that github repository of nibtools is read-only, because Peter is maintaining the nibtools in a SVN repository.
I think we have to wait for him to apply this patch on his side, so it takes effect. Perhaps, we can ask him again? I know that he takes some time to react in some cases.
I could only apply it to a branch, because if I add it to nibtools, I would get out-of-sync, and I absolutely don't what this.
Hi Spiro,
Thanks for your reply.
To lower the confusion I think that this PR should be closed
I'll try to write Peter again
BR/Uffe :-)
I closed it, as requested.