ports/sysutils/reptyr/files/patch-platform_freebsd_freebsd.c
Raphael Kubo da Costa 57f7e97b8d Fix build on FreeBSD 9 and clean up.
- Add a small patch to fix the build on FreeBSD 9 and unmark it BROKEN there.
- Drop patch-Makefile, everything that it was changed can be set via MAKE_ARGS
  instead.
- Unconditionally install the bash-completion file and stop build-depending on
  shells/bash-completion: it is not needed at all, reptyr just installs a file
  into a bash-completion directory and does not actually need it for that.
  The BASH option was not even working before r407168 (see bug 206541).

PR:		206539
Approved by:	Andrey Cherkashin <andoriyu@gmail.com> (maintainer)
MFH:		2016Q1
2016-01-27 10:30:42 +00:00

16 lines
568 B
C

Fix the build on FreeBSD 9:
cc1: warnings being treated as errors
platform/freebsd/freebsd.c: In function 'check_proc_stopped':
platform/freebsd/freebsd.c:57: warning: 'state' may be used uninitialized in this function
--- platform/freebsd/freebsd.c.orig 2015-06-05 21:41:48 UTC
+++ platform/freebsd/freebsd.c
@@ -54,7 +54,7 @@ int check_pgroup(pid_t target) {
int check_proc_stopped(pid_t pid, int fd) {
struct procstat *procstat;
struct kinfo_proc *kp;
- int state;
+ int state = 0;
unsigned int cnt;
procstat = procstat_open_sysctl();