From 11bb19d1ff445f5a3cccd1f9d75c67a72bc4fd01 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Tue, 20 May 2014 17:20:00 +0000 Subject: [PATCH] HDFS-6421. Fix vecsum.c compile on BSD and some other systems (Mit Desai via Colin Patrick McCabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1596325 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop-hdfs/src/main/native/libhdfs/test/vecsum.c | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e691c5076a1..224f83213cf 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -246,6 +246,9 @@ Release 2.5.0 - UNRELEASED HDFS-4913. Deleting file through fuse-dfs when using trash fails requiring root permissions (cmccabe) + HDFS-6421. Fix vecsum.c compile on BSD and some other systems. (Mit Desai + via Colin Patrick McCabe) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/test/vecsum.c b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/test/vecsum.c index 93d205ec780..fd18c9db5ee 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/test/vecsum.c +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/test/vecsum.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -48,7 +47,6 @@ static double timespec_to_double(const struct timespec *ts) struct stopwatch { struct timespec start; struct timespec stop; - struct rusage rusage; }; static struct stopwatch *stopwatch_create(void) @@ -66,12 +64,6 @@ static struct stopwatch *stopwatch_create(void) "error %d (%s)\n", err, strerror(err)); goto error; } - if (getrusage(RUSAGE_THREAD, &watch->rusage) < 0) { - int err = errno; - fprintf(stderr, "getrusage failed: error %d (%s)\n", - err, strerror(err)); - goto error; - } return watch; error: