diff --git a/include/solaris-compat/compat.h b/include/solaris-compat/compat.h
index a40ce4f1d62fce553e93eb9c44104d1bce486033..b34cf11f48ceeab86cdde09179f6ac96a48b2828 100644
--- a/include/solaris-compat/compat.h
+++ b/include/solaris-compat/compat.h
@@ -42,5 +42,5 @@ typedef unsigned int	u_int32_t;
 
 char* strsep(char** str, const char* delims);
 int setenv(const char *name, const char *value, int overwrite);
-void unsetenv(const char *name);
+int unsetenv(const char *name);
 #endif
diff --git a/strcompat.c b/strcompat.c
index 93a6b0c2b413fa65b2f3a2ad835c223e80bd899e..2efdb03d52f8b9f810d7d8e0cfb657ce2f382b40 100644
--- a/strcompat.c
+++ b/strcompat.c
@@ -47,8 +47,8 @@ int setenv(const char *name, const char *value, int overwrite)
 	return putenv(buf);
 }
 
-void unsetenv(const char *name)
+int unsetenv(const char *name)
 {
-	setenv(name, "", 0);
+	return setenv(name, "", 0);
 }