sdksyms: Skip empty symbols

Apparently on NetBSD we can hit failures like this:

sdksyms.c:1773:15: error: expected expression before ',' token
     (void *) &,                                                  /* ../../dri3/dri3.h:110 */

I've been unable to reproduce that locally (even in a NetBSD vm), but
an obvious workaround might be to just notice empty symbol names and
ignore them rather than emit invalid C code.

Tested-by: Thomas Klausner <wiz@netbsd.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2018-04-11 15:39:33 -04:00
parent d61e516c84
commit 0031bbad84

View File

@ -415,7 +415,8 @@ BEGIN {
sub(/[^a-zA-Z0-9_].*/, "", symbol);
#print;
printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
if (symbol != "")
printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line);
}
}