diff -ru procps-ng-3.3.7/lib/fileutils.c src/lib/fileutils.c
--- procps-ng-3.3.7/lib/fileutils.c	2013-03-19 10:54:28.000000000 +0100
+++ src/lib/fileutils.c	2013-05-22 14:47:07.526056101 +0200
@@ -9,10 +9,9 @@
 
 int close_stream(FILE * stream)
 {
-	const int some_pending = (__fpending(stream) != 0);
 	const int prev_fail = (ferror(stream) != 0);
 	const int fclose_fail = (fclose(stream) != 0);
-	if (prev_fail || (fclose_fail && (some_pending || errno != EBADF))) {
+	if (prev_fail || fclose_fail) {
 		if (!fclose_fail)
 			errno = 0;
 		return EOF;
diff -ru procps-ng-3.3.7/sysctl.c src/sysctl.c
--- procps-ng-3.3.7/sysctl.c	2013-03-19 10:54:29.000000000 +0100
+++ src/sysctl.c	2013-05-22 14:47:28.702056438 +0200
@@ -500,7 +500,7 @@
 	int globerr;
 	int j;
 
-	globerr = glob(filename, GLOB_NOCHECK | GLOB_TILDE, NULL, &globbuf);
+	globerr = glob(filename, GLOB_NOCHECK, NULL, &globbuf);
 	if (globerr != 0 && globerr != GLOB_NOMATCH)
 		xerr(EXIT_FAILURE, _("glob failed"));
 
diff -ru procps-ng-3.3.7/top/top.h src/top/top.h
--- procps-ng-3.3.7/top/top.h	2013-03-19 10:54:29.000000000 +0100
+++ src/top/top.h	2013-05-22 14:46:29.550055498 +0200
@@ -488,10 +488,9 @@
          return Frame_srtflg * STRCMP((*Q)->v[0], (*P)->v[0]); } \
       return Frame_srtflg * STRCMP((*Q)->s, (*P)->s); }
 #define SCB_STRX(f,s) \
-   int strverscmp(const char *s1, const char *s2); \
    static int SCB_NAME(f) (const proc_t **P, const proc_t **Q) { \
       if (!(*P)->s || !(*Q)->s) return SORT_eq; \
-      return Frame_srtflg * strverscmp((*Q)->s, (*P)->s); }
+      return Frame_srtflg * STRCMP((*Q)->s, (*P)->s); }
 
 /*
  * The following three macros are used to 'inline' those portions of the
