Description: Make tightvnc buildable for the hurd-i386 architecture
 With hurd-i386 OPEN_MAX is tried to be set to NOFILES_MAX which is undefined.
 This patch makes sure that OPEN_MAX can always obtain a value.
Forwarded: no
Author: Sven Geuer <debmaint@g-e-u-e-r.de>
Last-Update: 2021-03-01
--- a/Xvnc/programs/Xserver/os/osdep.h
+++ b/Xvnc/programs/Xserver/os/osdep.h
@@ -100,7 +100,7 @@
 #if defined(NOFILE) && !defined(NOFILES_MAX)
 #define OPEN_MAX NOFILE
 #else
-#ifndef __EMX__
+#if !defined(__EMX__) && defined(NOFILES_MAX)
 #define OPEN_MAX NOFILES_MAX
 #else
 #define OPEN_MAX 256
--- a/Xvnc/programs/Xserver/include/servermd.h
+++ b/Xvnc/programs/Xserver/include/servermd.h
@@ -596,6 +596,14 @@
 #define LOG2_BYTES_PER_SCANLINE_PAD 2
 #endif /* __SIZE_WIDTH __ */
 
+/*
+ * Make sure GLYPHPADBYTES and GETLEFTBITS_ALIGNMENT are always defined
+ */
+#undef GLYPHPADBYTES
+#define GLYPHPADBYTES 4
+#undef GETLEFTBITS_ALIGNMENT
+#define GETLEFTBITS_ALIGNMENT 1
+
 /* 
  *   This returns the number of padding units, for depth d and width w.
  * For bitmaps this can be calculated with the macros above.
