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/trunk@1596324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
64ec743e6c
commit
668f70db66
@ -498,6 +498,9 @@ Release 2.5.0 - UNRELEASED
|
|||||||
HDFS-4913. Deleting file through fuse-dfs when using trash fails requiring
|
HDFS-4913. Deleting file through fuse-dfs when using trash fails requiring
|
||||||
root permissions (cmccabe)
|
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
|
Release 2.4.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <malloc.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -48,7 +47,6 @@ static double timespec_to_double(const struct timespec *ts)
|
|||||||
struct stopwatch {
|
struct stopwatch {
|
||||||
struct timespec start;
|
struct timespec start;
|
||||||
struct timespec stop;
|
struct timespec stop;
|
||||||
struct rusage rusage;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct stopwatch *stopwatch_create(void)
|
static struct stopwatch *stopwatch_create(void)
|
||||||
@ -66,12 +64,6 @@ static struct stopwatch *stopwatch_create(void)
|
|||||||
"error %d (%s)\n", err, strerror(err));
|
"error %d (%s)\n", err, strerror(err));
|
||||||
goto error;
|
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;
|
return watch;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
Reference in New Issue
Block a user