fix errors with gcc7
patch by Dr. Werner Fink (from SuSE)
See http://tug.org/pipermail/tex-live/2017-June/040192.html
---
 texk/web2c/luatexdir/luaffi/ctype.c |    4 ++++
 texk/web2c/luatexdir/luaffi/ffi.h   |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

--- texlive-bin.orig/texk/web2c/luatexdir/luaffi/ctype.c
+++ texlive-bin/texk/web2c/luatexdir/luaffi/ctype.c
@@ -245,6 +245,10 @@
 
     lua_pop(L, 1); /* mt */
     cd = (struct cdata*) lua_touserdata(L, idx);
+    if (!cd) {
+        lua_pushnil(L);
+        return NULL;
+    }
     *ct = cd->type;
     lua_getuservalue(L, idx);
 
--- texlive-bin.orig/texk/web2c/luatexdir/luaffi/ffi.h
+++ texlive-bin/texk/web2c/luatexdir/luaffi/ffi.h
@@ -370,7 +370,7 @@
 #endif
 struct cdata {
     const struct ctype type
-#ifdef __GNUC__
+#if 0 /* def __GNUC__ */
       __attribute__ ((aligned(16)))
 #endif
       ;
