MeanEYE / Disk-Indicator

Small program for Linux that will turn your Scroll, Caps or Num Lock LED into hard disk indicator.
GNU General Public License v3.0
155 stars 9 forks source link

Error in make: _BSD_SOURCE and _SVID_SOURCE are deprecated #6

Closed omid closed 9 years ago

omid commented 9 years ago

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?

MeanEYE commented 9 years ago

Which distribution?

MeanEYE commented 9 years ago

Also, we don't use _BSD_SOURCE anymore. _POSIX_SOURCE is enabled however.

omid commented 9 years ago

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

MeanEYE commented 9 years ago

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.

omid commented 9 years ago

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

MeanEYE commented 9 years ago

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.

MeanEYE commented 9 years ago

Okay, looks like renaming definition to _POSIX_C_SOURCE might fix it. Can you pull and test?

MeanEYE commented 9 years ago

Am marking it as fixed as no complaints have been received for almost 2 weeks.