Created
January 17, 2012 03:44
-
-
Save letoh/1624503 to your computer and use it in GitHub Desktop.
fix compilation failure
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/extprims.c b/extprims.c | |
index 2b7c438..1a1c532 100644 | |
--- a/extprims.c | |
+++ b/extprims.c | |
@@ -326,7 +326,7 @@ NEWPRIM(acceptconn) { | |
/* ( listen_sock -- connection_sock ) */ | |
struct sockaddr_in their_addr; | |
- int tp = sizeof(struct sockaddr_in); | |
+ socklen_t tp = sizeof(struct sockaddr_in); | |
int listenfd,connfd; | |
listenfd = pop(); | |
diff --git a/frugal.c b/frugal.c | |
index 0a7a927..d9602fd 100644 | |
--- a/frugal.c | |
+++ b/frugal.c | |
@@ -11,6 +11,7 @@ | |
#include <ctype.h> | |
#include <stdlib.h> | |
#include <stdarg.h> | |
+#include <string.h> | |
#include <setjmp.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
@@ -262,11 +263,11 @@ void c_store(struct forth_instance *fi) { | |
void c_comma(struct forth_instance *fi) { | |
((char *) fi->heapp)[0] = (char) st_pop(fi); | |
- ((char *) fi->heapp)++; | |
+ fi->heapp = (int *)(((char *) fi->heapp) + 1); | |
} | |
void align(struct forth_instance *fi) { | |
- while (((int)(fi->heapp) % 4) != 0) ((char *)(fi->heapp))++; | |
+ while (((int)(fi->heapp) % 4) != 0) fi->heapp = (int *)(((char *) fi->heapp) + 1); | |
} | |
void sp(struct forth_instance *fi) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment