[dev] [st] latest git fails to compile on openbsd

From: Nils R <ml_AT_hxgn.net>
Date: Fri, 6 Jun 2014 13:55:17 +0200 (CEST)

Hi dev_AT_,

in commit c6fcb78b3a9a73b691875048848430c18870a0fc[1], Colourmap was renamed to the
american version "Colormap", which is already defined in openbsds X.h:

  st.c:183: error: redefinition of typedef 'Colormap'
  /usr/X11R6/include/X11/X.h:104: error: previous declaration of 'Colormap' was here

My patch below solves it for me, but i only tested on openbsd.

Any thoughts?


[1]: http://git.suckless.org/st/commit/?id=c6fcb78b3a9a73b691875048848430c18870a0fc

diff --git a/st.c b/st.c
index 8b65450..45b9a02 100644
--- a/st.c
+++ b/st.c
_AT_@ -180,7 +180,7 @@ typedef unsigned short ushort;
 typedef XftDraw *Draw;
 typedef XftColor Color;
-typedef Colormap Colormap;
+typedef Colormap Colourmap;
 typedef struct {
         char c[UTF_SIZ]; /* character code */
_AT_@ -241,7 +241,7 @@ typedef struct {
 /* Purely graphic info */
 typedef struct {
         Display *dpy;
- Colormap cmap;
+ Colourmap cmap;
         Window win;
         Drawable buf;
         Atom xembed, wmdeletewin, netwmname, netwmpid;
Received on Fri Jun 06 2014 - 13:55:17 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 06 2014 - 14:00:09 CEST