[Xcb] [PATCH] cursor: Fix issue with gcc

Stefan Dirsch sndirsch at suse.de
Thu Apr 21 15:45:24 UTC 2016


From: Kristoffer Grönlund <krig at koru.se>

cursor_shape_to_id should not be declared const, else it is not added
to the static library.
---
 cursor/cursor.h          | 2 +-
 cursor/shape_to_id.gperf | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cursor/cursor.h b/cursor/cursor.h
index 455dc34..3fe7096 100644
--- a/cursor/cursor.h
+++ b/cursor/cursor.h
@@ -161,7 +161,7 @@ typedef struct xcint_image_t {
 } __attribute__((packed)) xcint_image_t;
 
 /* shape_to_id.c */
-const int cursor_shape_to_id(const char *name);
+int cursor_shape_to_id(const char *name);
 
 /* parse_cursor_file.c */
 int parse_cursor_file(xcb_cursor_context_t *c, const int fd, xcint_image_t **images, int *nimg);
diff --git a/cursor/shape_to_id.gperf b/cursor/shape_to_id.gperf
index 23615f9..6c8818e 100644
--- a/cursor/shape_to_id.gperf
+++ b/cursor/shape_to_id.gperf
@@ -1,5 +1,5 @@
 struct shape_mapping { const char *name; int number; };
-const int cursor_shape_to_id(const char *name);
+int cursor_shape_to_id(const char *name);
 %%
 X_cursor,0
 arrow,1
@@ -79,7 +79,7 @@ ur_angle,74
 watch,75
 xterm,76
 %%
-const int cursor_shape_to_id(const char *name) {
+int cursor_shape_to_id(const char *name) {
 	struct shape_mapping *mapping = in_word_set(name, strlen(name));
 	return (mapping ? (mapping->number * 2) : -1);
 }
-- 
2.6.2



More information about the Xcb mailing list