Skip to content

Commit e6701d9

Browse files
committed
I had a problem with JustPingC both in gcc 4.4.6 and ICC 12. Tweaked it.
1 parent ae6097e commit e6701d9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

network-transport-tcp/benchmarks/JustPingC.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ int client(int pings) {
7979
printf("starting client\n");
8080

8181
struct addrinfo hints, *res;
82-
int error, client_socket;
82+
int error, client_socket, i;
8383

8484
memset(&hints, 0, sizeof(hints));
8585
hints.ai_family = PF_INET;
@@ -102,7 +102,7 @@ int client(int pings) {
102102
return -1;
103103
}
104104

105-
for(int i = 0; i < pings; i++) {
105+
for(i = 0; i < pings; i++) {
106106
double timestamp_before = timestamp();
107107

108108
send(client_socket, "ping123", 8, 0);

network-transport-tcp/benchmarks/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ INCLUDES=-i${ROOT}/network-transport/src -i${ROOT}/network-transport-tcp/src
88
# PROF_GHC=-prof -fprof-auto
99
# PROF_EXE=+RTS -pa -RTS
1010

11-
GCC=gcc -std=c99
11+
GCC=gcc
1212
GHC=ghc -rtsopts -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XCPP -XGeneralizedNewtypeDeriving -optP-include -optPcabal_macros.h
1313

1414
all: NewTransport.ps Indirection.ps Headers.ps

0 commit comments

Comments
 (0)