Followup to r1804618, provide a dummy error to avoid a zero-sized array.
* build/generator/gen_base.py
(GeneratorBase.write_errno_table): Provide a dummy error.
@@ -289,7 +289,6 @@ class GeneratorBase:
])
# Remove ',' for c89 compatibility
- if len(codes):
lines[-1] = lines[-1][0:-1]
lines.extend([
@@ -300,9 +299,11 @@ class GeneratorBase:
# errno names can vary depending on the Python, and possibly the
# OS, version and they are not even used by normal release builds
# so omit them from the tarball. We always want the struct itself
- # so that SVN_DEBUG builds still compile.
+ # so that SVN_DEBUG builds still compile and it needs a dummy
+ # entry to avoid a zero-sized array.
write_struct('svn__errno',
- [] if self.release_mode else errno.errorcode.items())
+ [(0, "success")] if self.release_mode
+ else errno.errorcode.items())
# Fetch and write apr_errno.h codes.
aprerr = []
