News for hackers. Stuff that matters.
Re:Sct – set color temperature by taneliv on Monday November 16, 2015 @01:41PM (#10576175)
Cool! Or, warm depending on parameter.

On Ubuntu includes are apparently broken, complaining about strings.h included from Xlibint.h ...

There's probably a yak to shave in that. However, if you're lazy and hit the same problem, you can compile a functional sct by lifting declarations of i and c outside their loops and dropping "-std=c99" from the command line.

Re:Sct – set color temperature by protopete on Monday November 16, 2015 @03:11PM (#10576822)
I was able to compile it on Ubuntu after moving the X11 includes to the bottom of the list:

  #include <stdio.h>
  #include <strings.h>
  #include <string.h>
  #include <stdlib.h>
  #include <stdint.h>
  #include <inttypes.h>
  #include <stdarg.h>
  #include <math.h>
  #include <X11/Xlib.h>
  #include <X11/Xlibint.h>
  #include <X11/Xproto.h>
  #include <X11/Xatom.h>
  #include <X11/extensions/Xrandr.h>
  #include <X11/extensions/Xrender.h>
Re:Sct – set color temperature by diqu on Monday November 16, 2015 @05:30PM (#10577743)
Thank you, had the same problem on Debian. This made it work.
Re:Sct – set color temperature by hiimnate on Monday November 16, 2015 @05:25PM (#10577714)
I also had to do some fiddling with the includes (removing the `strings.h` include got it working for me. Why is this required?
Re:Sct – set color temperature by ploxiln on Monday November 16, 2015 @09:14PM (#10578772)
Historically, including some headers ended up including some other headers automatically, such that the author might not realize what headers the file depends on, because it compiles without them explicitly included. glibc (and maybe gcc and xlib?) have been cleaning this up where possible, slowly over time. So a file that had "correct enough" includes for an older glibc might now be caught not including a header it needed all along.

Or maybe it's a similar situation but actually related to "feature test macros" (see https://lwn.net/Articles/590381/)

Re:Sct – set color temperature by pdw on Monday November 16, 2015 @03:17PM (#10576855)
Just remove the Xlibint.h include. That's internal Xlib stuff, it's not needed.
Re:Sct – set color temperature by taneliv on Monday November 16, 2015 @03:48PM (#10577043)
Ah, no yak shaving was necessary, cheers.