aboutsummaryrefslogtreecommitdiffstats
path: root/lib/os_mon/c_src
diff options
context:
space:
mode:
authorMaciej Małecki <[email protected]>2013-07-26 23:21:29 +0200
committerMaciej Małecki <[email protected]>2013-07-26 23:25:58 +0200
commit483a8a37e9e6f5a82417adcaf7db55a2283f87bb (patch)
tree2f285ba57439b715b834b344998038f1cd3c80a9 /lib/os_mon/c_src
parenta938fc96881564f5f56a510b0c750efaa9ed48e4 (diff)
downloadotp-483a8a37e9e6f5a82417adcaf7db55a2283f87bb.tar.gz
otp-483a8a37e9e6f5a82417adcaf7db55a2283f87bb.tar.bz2
otp-483a8a37e9e6f5a82417adcaf7db55a2283f87bb.zip
Fix compilation on Solaris
Trying to compile R16B01 on SmartOS resulted in following errors: gcc -c -o ../priv/obj/i386-pc-solaris2.11/ferrule.o -Werror=return-type -g -O2 -I/root/otp_src_R16B01/erts/i386-pc-solaris2.11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-tree-copyrename -DHAVE_CONFIG_H ferrule.c ferrule.c:53:1: error: return type defaults to 'int' [-Werror=return-type] ... gcc -c -o ../priv/obj/i386-pc-solaris2.11/mod_syslog.o -Werror=return-type -g -O2 -I/root/otp_src_R16B01/erts/i386-pc-solaris2.11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-tree-copyrename -DHAVE_CONFIG_H mod_syslog.c mod_syslog.c:50:1: error: return type defaults to 'int' [-Werror=return-type] mod_syslog.c: In function 'make_exit': mod_syslog.c:136:5: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default] mod_syslog.c: In function 'main': mod_syslog.c:131:1: error: control reaches end of non-void function [-Werror=return-type] Adding return values and types to `main` functions in `mod_syslog.c` and `ferrule.c` fixed the build.
Diffstat (limited to 'lib/os_mon/c_src')
-rw-r--r--lib/os_mon/c_src/ferrule.c2
-rw-r--r--lib/os_mon/c_src/mod_syslog.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/os_mon/c_src/ferrule.c b/lib/os_mon/c_src/ferrule.c
index 744f302b2d..c55f594f34 100644
--- a/lib/os_mon/c_src/ferrule.c
+++ b/lib/os_mon/c_src/ferrule.c
@@ -50,7 +50,7 @@
#define FDS_STDIN 0
#define FDS_PIPE 1
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
/* usage: ferrule ownpath */
{
int i, pipe_fd;
diff --git a/lib/os_mon/c_src/mod_syslog.c b/lib/os_mon/c_src/mod_syslog.c
index 87fbfbac22..b1bbf80b2a 100644
--- a/lib/os_mon/c_src/mod_syslog.c
+++ b/lib/os_mon/c_src/mod_syslog.c
@@ -47,7 +47,7 @@
#define TRUE 1
#define WAIT 1
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
/* usage: mod_syslog mode ownpath syslogconf */
{
int syslogd_pid, n_lines_copied=0;
@@ -128,6 +128,7 @@ main(int argc, char *argv[])
make_exit(PIPE_NOT_FOUND);
else */
make_exit(OK);
+ return 0;
}
void make_exit(int exit_code)