Skip to content

Commit dd06b05

Browse files
committed
Changed some stuff so that it will compile under arch linux.
1 parent b517ddc commit dd06b05

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

Makefile.am

+6-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ libgzstream_a_SOURCES = include/gzstream/gzstream.h include/gzstream/gzstream.cp
1616
if OS_IS_KALI
1717
SUBDIRS = include/gzstream/
1818
endif
19-
ansvif_SOURCES = src/log.cpp src/bin2hex.cpp src/popen2.cpp src/main.cpp src/help.cpp src/match_fault.cpp src/sys_string.cpp src/man_read.cpp src/trash.cpp src/randomizer.cpp src/remove_chars.cpp src/to_int.cpp src/file_check.cpp src/reaper.cpp src/write_file.cpp src/templates.cpp src/oxagast.cpp include/gzstream/gzstream.h include/xmlwriter/xml_writer.hpp src/version.h
19+
ansvif_SOURCES = src/log.cpp src/bin2hex.cpp src/popen2.cpp src/main.cpp src/help.cpp src/match_fault.cpp src/sys_string.cpp src/man_read.cpp src/trash.cpp src/randomizer.cpp src/remove_chars.cpp src/to_int.cpp src/file_check.cpp src/reaper.cpp src/write_file.cpp src/templates.cpp src/oxagast.cpp src/version.h include/gzstream/gzstream.h include/xmlwriter/xml_writer.hpp include/stack.h
2020
if OS_IS_REDHAT
2121
ansvif_LDADD = -lgzstream -lstdc++ -lpthread -lz -L.
2222
ansvif_LDFLAGS = -I./include/gzstream -I./include/xml_writer -I./src/linux
@@ -27,6 +27,11 @@ ansvif_LDADD = -lgzstream -lstdc++ -lpthread -lz -L.
2727
ansvif_LDFLAGS = -I./include/gzstream -I./include/xml_writer -I./src/linux
2828
ansvif_CPPFLAGS = -O3 -D __DEBIAN__ -D __NOTANDROID__ -Wall -std=c++11 -ftemplate-depth=1024
2929
endif
30+
if OS_IS_ARCH
31+
ansvif_LDADD = -lgzstream -lstdc++ -lpthread -lz -L.
32+
ansvif_LDFLAGS = -I./include/gzstream -I./include/xml_writer -I./src/linux
33+
ansvif_CPPFLAGS = -O3 -D __ARCH__ -D __NOTANDROID__ -Wall -std=c++11 -ftemplate-depth=1024
34+
endif
3035
if OS_IS_FREEBSD
3136
ansvif_LDADD = -lstdc++ -lz -L.
3237
ansvif_LDFLAGS = -I./include/gzstream -I./include/xml_writer -I./src/linux -pthread

ansvif.i64

77.9 MB
Binary file not shown.

configure.ac

+5
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ if test "$OS_IS_KALI" = "0"; then
8484
AC_DEFINE([__KALI__], [], ["build for Kali"])
8585
AC_MSG_NOTICE([trying to build for a Kali based system])
8686
fi
87+
AM_CONDITIONAL(OS_IS_ARCH, [ test `grep "Arch" /etc/os-release | wc -l` -gt "0" ])
88+
if test "$OS_IS_ARCH" = "0"; then
89+
AC_DEFINE([__ARCH__], [], ["build for Arch"])
90+
AC_MSG_NOTICE([trying to build for a Arch based system])
91+
fi
8792
AM_CONDITIONAL(OS_IS_FREEBSD, [ test `uname -o` == "FreeBSD" ])
8893
if test "$IS_IS_FREEBSD" = "0"; then
8994
AC_DEFINE([__UNKNOWN], [], ["build for FreeBSD"])

include/xmlwriter/xml_writer.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# define INDENT " "
66
# define NEWLINE "\n"
77

8-
# include <string.h>
8+
#include <string.h>
99
#ifdef __NOTANDROID__
1010
#include "include/stack.h"
1111
#endif
@@ -15,7 +15,7 @@
1515
#ifdef __WIN32
1616
#include "../stack.h"
1717
#endif
18-
# include <iostream>
18+
#include <iostream>
1919

2020
class Writer
2121
{

src/log.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
#ifdef __NOTANDROID__
2-
#include "../include/xmlwriter/xml_writer.hpp"
3-
#endif
4-
#ifdef __ANDROID__
5-
#include "../include/xmlwriter/xml_writer.hpp"
6-
#endif
7-
#ifdef __NOTANDROID__
82
#include "src/version.h"
93
#endif
104
#ifdef __ANDROID__
115
#include "version.h"
126
#endif
137
#ifdef _WIN32
148
#include "version.h"
15-
#include "../include/xmlwriter/xml_writer.hpp"
169
#endif
10+
#ifdef __linux__
11+
#include "version.h"
12+
#endif
13+
#include "../include/stack.h"
14+
#include "../include/xmlwriter/xml_writer.hpp"
1715
#include <cstdlib>
1816
#include <cstring>
1917
#include <fstream>
2018
#include <sstream>
19+
#include <iostream>
2120
#include <stdio.h>
2221
#include <string.h>
2322
#include <unistd.h>

src/match_fault.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,8 @@ bool match_seg(struct Options o, struct RunCommands runit, struct Monopoly go, s
546546
exit(64);
547547
}
548548
}
549+
549550
}
550551
return (true);
552+
551553
}

0 commit comments

Comments
 (0)