Closed omid closed 9 years ago
Which distribution?
Also, we don't use _BSD_SOURCE
anymore. _POSIX_SOURCE
is enabled however.
I'm using Arch... By the way... I found another shell script for this perpose. http://superuser.com/questions/362694/use-caps-lock-led-as-hdd-led-or-custom-indicator
Thanks for linking that source. There's a reason why I went for C language in this case. I wanted minimum overhead and memory usage. My guess would be that this script would eat through entropy pool really fast as it's spawning new processes at least 10x a second.
As for your issue, are you sure you are using the latest version from the repository. It's suspicious that error message is mentioning _BSD_SOURCE
when _POSIX_SOURCE
is actually being used. That said, I only use that flag to have a CPU cycle-based sleep option. Easily solvable with a switch to timer based although that one might use more memory.
Yes I has your latest code + arch latest packages :-) I'm sure your code is far far better and more optimized than that shell script
Okay, to avoid issues of this kind in the future, I'll switch to time based sleep function. There's no need to complicate the process.
Okay, looks like renaming definition to _POSIX_C_SOURCE
might fix it. Can you pull and test?
Am marking it as fixed as no complaints have been received for almost 2 weeks.
There is an error when I want to compile it: /usr/include/features.h:148:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
What can I do?