summaryrefslogtreecommitdiff
path: root/gtk/channel-playback.c
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-02-27 12:33:28 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-03-13 17:15:42 +0100
commitb7c9343ba20abd93429a37b475920cde97bf01e8 (patch)
tree633d08131c5d412ada6a967964f5d469521bc21e /gtk/channel-playback.c
parent6f379eeba97eb8cf60a18591c19c0763b1636417 (diff)
Make sure config.h is included first in all .c files
This is recommended by autoconf documentation http://nondot.org/sabre/Mirrored/autoconf-2.12/autoconf_3.html#SEC15 and some #defines in config.h can change what happens in system headers, so config.h has to be included first. The only file which does not get this treatment is gtk/spice-client-gtk-module.c as this breaks the build on gtk+2: CC SpiceClientGtk_la-spice-client-gtk-module.lo In file included from /usr/include/python2.7/pyconfig.h:6:0, from /usr/include/python2.7/Python.h:8, from /usr/include/pygtk-2.0/pygobject.h:5, from spice-client-gtk-module.c:20: /usr/include/python2.7/pyconfig-64.h:1182:0: error: "_POSIX_C_SOURCE" redefined [-Werror] #define _POSIX_C_SOURCE 200112L ^ In file included from /usr/include/limits.h:25:0, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:168, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/limits.h:34, from /usr/lib64/glib-2.0/include/glibconfig.h:11, from /usr/include/glib-2.0/glib/gtypes.h:34, from /usr/include/glib-2.0/glib/galloca.h:34, from /usr/include/glib-2.0/glib.h:32, from /usr/include/glib-2.0/gobject/gbinding.h:30, from /usr/include/glib-2.0/glib-object.h:25, from ./glib-compat.h:24, from ../config.h:201, from spice-client-gtk-module.c:18: /usr/include/features.h:228:0: note: this is the location of the previous definition # define _POSIX_C_SOURCE 200809L ^ cc1: all warnings being treated as errors
Diffstat (limited to 'gtk/channel-playback.c')
-rw-r--r--gtk/channel-playback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/channel-playback.c b/gtk/channel-playback.c
index bff5428..7789aa8 100644
--- a/gtk/channel-playback.c
+++ b/gtk/channel-playback.c
@@ -15,6 +15,8 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
#include "spice-client.h"
#include "spice-common.h"
#include "spice-channel-priv.h"