Package: libprelude / 4.1.0-4.2

007-fix_libprelude-error_hurd.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: Fix libprelude-error compilation on hurd-i386
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2017-06-22
Forwarded: https://www.prelude-siem.org/issues/893

--- libprelude-3.1.0/src/libprelude-error/mkerrcodes.awk	2016-09-15 02:49:10.806000884 -0400
+++ libprelude-3.1.0/src/libprelude-error/mkerrcodes.awk	2017-06-24 10:17:40.419430220 -0400
@@ -62,7 +62,7 @@
 /^#/ { next; }
 
 header {
-  if ($0 ~ /^[ \t]*[0-9]+/)
+  if ($0 ~ /^[ \t]*[0-9]+/ || $0 ~ /^[ \t]*[(].*[)][ \tA-Za-z_0-9]*$/)
     {
       header = 0;
 
@@ -84,7 +84,10 @@
   if (/^$/)
     next;
 
-  print "  { " $1 ", \"" $2 "\" },";
+  nfbak=$NF;
+  $NF="";
+
+  print "  { " $0 ", \"" nfbak "\" },";
 }
 
 END {