AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_SEARCH_LIBS([setproctitle], [util bsd])
-AC_REPLACE_FUNCS([strlcpy strnlen strndup fgetln setproctitle])
+AC_REPLACE_FUNCS([setproctitle])
+AC_CHECK_FUNCS([setproctitle_init])
+AC_REPLACE_FUNCS([strlcpy strnlen strndup fgetln])
AC_CHECK_FUNCS([setresuid setresgid])
case " $LIBS " in
#endif
int
-lldpd_main(int argc, char *argv[])
+lldpd_main(int argc, char *argv[], char *envp[])
{
struct lldpd *cfg;
struct lldpd_chassis *lchassis;
saved_argv = argv;
+#if HAVE_SETPROCTITLE_INIT
+ setproctitle_init(argc, argv, envp);
+#endif
+
/*
* Get and parse command line options
*/
void lldpd_recv(struct lldpd *, struct lldpd_hardware *, int);
void lldpd_send(struct lldpd_hardware *);
void lldpd_loop(struct lldpd *);
-int lldpd_main(int, char **);
+int lldpd_main(int, char **, char **);
void lldpd_update_localports(struct lldpd *);
void lldpd_cleanup(struct lldpd *);
*/
int
-main(int argc, char **argv)
+main(int argc, char **argv, char **envp)
{
- return lldpd_main(argc, argv);
+ return lldpd_main(argc, argv, envp);
}