-
-
Save kodo-pp/bbdc286c9db915fa190b9dcf6a5446a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/build.sh b/build.sh | |
index 725a3e2..fe1eaed 100755 | |
--- a/build.sh | |
+++ b/build.sh | |
@@ -58,7 +58,7 @@ fi | |
if [ $1 = "release" ] | |
then | |
echo "Building release" | |
- gcc ping.c util.c message.c socket.c ddos.c main.c -lm -Ofast -Os -lpthread -o ddos | |
+ gcc -std=gnu99 memcrashed.c ping.c util.c message.c socket.c ddos.c main.c -lm -Ofast -Os -lpthread -o ddos | |
exit | |
fi | |
if [ $1 = "update" ] | |
diff --git a/ping.c b/ping.c | |
index 9aa684a..93b9f90 100644 | |
--- a/ping.c | |
+++ b/ping.c | |
@@ -17,7 +17,7 @@ | |
//Code of this module is based on https://github.com/hayderimran7/advanced-socket-programming/blob/master/ping.c | |
#ifdef __ANDROID__ | |
#warning Non-rooted android devices does not support ping module | |
-#define errno_t int | |
+//#define errno_t int | |
#endif | |
#define DEBUG | |
@@ -89,7 +89,7 @@ bool send_packet() | |
return false; | |
} | |
if ((n = recvfrom(sockfd, recvpacket, sizeof(recvpacket), 0, (struct sockaddr*) &from, &fromlen) < 0)){ | |
- errno_t err=errno; | |
+ int err=errno; | |
if (errno == EINTR){ | |
return false; | |
} | |
diff --git a/util.h b/util.h | |
index ca0ba08..21d3417 100644 | |
--- a/util.h | |
+++ b/util.h | |
@@ -11,6 +11,7 @@ | |
#include <assert.h> | |
#include <stdbool.h> | |
+#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment