Skip to content

Instantly share code, notes, and snippets.

@theeternalsw0rd
Created June 14, 2016 23:35
Show Gist options
  • Save theeternalsw0rd/a870223128456315fea2844f4d74e158 to your computer and use it in GitHub Desktop.
Save theeternalsw0rd/a870223128456315fea2844f4d74e158 to your computer and use it in GitHub Desktop.
Openssh on Mac Sierra invalid VIS declarations workaround
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index 9f7ca14..b2a09c0 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -43,7 +43,7 @@
#endif
#include <string.h>
-#include <vis.h>
+#include "vis.h"
#define SPT_NONE 0 /* don't use it at all */
#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */
diff --git a/openbsd-compat/vis.h b/openbsd-compat/vis.h
index d1286c9..01efb91 100644
--- a/openbsd-compat/vis.h
+++ b/openbsd-compat/vis.h
@@ -35,9 +35,6 @@
/* OPENBSD ORIGINAL: include/vis.h */
#include "includes.h"
-#if !defined(HAVE_STRNVIS) || defined(BROKEN_STRNVIS)
-
-#ifndef _VIS_H_
#define _VIS_H_
#include <sys/types.h>
@@ -90,6 +87,3 @@ int unvis(char *, char, int *, int);
ssize_t strnunvis(char *, const char *, size_t)
__attribute__ ((__bounded__(__string__,1,3)));
-#endif /* !_VIS_H_ */
-
-#endif /* !HAVE_STRNVIS || BROKEN_STRNVIS */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment