Fixes for build issues caused by recent restructuring
* Add typedef for XF86OptionPtr for Xorg < 112
* Include stddef.h to prevent missing size_t definition errors
* Workaround for libtool convenience library issue
diff --git a/unix/xserver/hw/vnc/Makefile.am b/unix/xserver/hw/vnc/Makefile.am
index 902aabf..ab8becb 100644
--- a/unix/xserver/hw/vnc/Makefile.am
+++ b/unix/xserver/hw/vnc/Makefile.am
@@ -31,6 +31,11 @@
$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/fb/fbcmap_mi.c buildtime.c
+# Xvnc contains no C++ sources so automake doesn't understand that we
+# need to use the C++ compiler to link things. This is the upstream
+# recommendation for coaxing automake.
+nodist_EXTRA_Xvnc_SOURCES = dummy.cxx
+
Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DTIGERVNC -DNO_MODULE_EXTS \
-UHAVE_CONFIG_H \
-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
@@ -47,6 +52,9 @@
libvnc_la_SOURCES = vncModule.c
+# See Xvnc magic above
+nodist_EXTRA_libvnc_la_SOURCES = dummy.cxx
+
libvnc_la_CPPFLAGS = $(XVNC_CPPFLAGS) -I$(TIGERVNC_SRCDIR)/common -UHAVE_CONFIG_H \
-I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/hw/xfree86/os-support \
diff --git a/unix/xserver/hw/vnc/vncExtInit.h b/unix/xserver/hw/vnc/vncExtInit.h
index 6c9857c..65cbbe4 100644
--- a/unix/xserver/hw/vnc/vncExtInit.h
+++ b/unix/xserver/hw/vnc/vncExtInit.h
@@ -20,6 +20,7 @@
#define __VNCEXTINIT_H__
#include <stdint.h>
+#include <stddef.h>
#include <sys/select.h>
// Only from C++
diff --git a/unix/xserver/hw/vnc/vncModule.c b/unix/xserver/hw/vnc/vncModule.c
index 5dcf875..8cbf9c2 100644
--- a/unix/xserver/hw/vnc/vncModule.c
+++ b/unix/xserver/hw/vnc/vncModule.c
@@ -29,6 +29,9 @@
#endif
#include "xorg-version.h"
+#if XORG <= 111
+typedef pointer XF86OptionPtr;
+#endif
#include "xf86.h"
#include "xf86Module.h"