From 28d911aa32f9f885232fced962f63caf23e7f097 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 1 Feb 2017 11:55:39 +1300 Subject: [PATCH] gen_ntstatus.py: Add prototype to generated py_ntstatus.c Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Reviewed-by: Garming Sam --- source4/scripting/bin/gen_ntstatus.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source4/scripting/bin/gen_ntstatus.py b/source4/scripting/bin/gen_ntstatus.py index 4738177aa98..b234d012151 100755 --- a/source4/scripting/bin/gen_ntstatus.py +++ b/source4/scripting/bin/gen_ntstatus.py @@ -180,6 +180,10 @@ def generatePythonFile(out_file): out_file.write("\t\treturn PyInt_FromLong(v);\n"); out_file.write("\t}\n"); out_file.write("}\n\n"); + # This is needed to avoid a missing prototype error from the C + # compiler. There is never a prototype for this function, it is a + # module loaded by python with dlopen() and found with dlsym(). + out_file.write("void initntstatus(void);\n") out_file.write("void initntstatus(void)\n") out_file.write("{\n") out_file.write("\tPyObject *m;\n\n") -- 2.47.2