Skip to content

Commit

Permalink
Explicitly import headers to appease gcc on Debian Unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Sep 30, 2024
1 parent e633480 commit 8751084
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
15 changes: 8 additions & 7 deletions etc/afpd/afp_asp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*
* modified from main.c. this handles afp over asp.
* modified from main.c. this handles afp over asp.
*/

#ifdef HAVE_CONFIG_H
Expand Down Expand Up @@ -31,6 +31,7 @@
#include <atalk/compat.h>
#include <atalk/util.h>
#include <atalk/globals.h>
#include <atalk/netatalk_conf.h>

#include "switch.h"
#include "auth.h"
Expand Down Expand Up @@ -219,19 +220,19 @@ void afp_over_asp(AFPObj *obj)
child = obj;
asp = (ASP) obj->handle;

/* install signal handlers
/* install signal handlers
* With ASP tickle handler is done in the parent process
*/
memset(&action, 0, sizeof(action));

/* install SIGHUP */
action.sa_handler = afp_asp_reload;
action.sa_handler = afp_asp_reload;
sigemptyset( &action.sa_mask );
sigaddset(&action.sa_mask, SIGTERM);
sigaddset(&action.sa_mask, SIGUSR1);
#ifdef SERVERTEXT
sigaddset(&action.sa_mask, SIGUSR2);
#endif
#endif
action.sa_flags = SA_RESTART;
if ( sigaction( SIGHUP, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
Expand All @@ -245,7 +246,7 @@ void afp_over_asp(AFPObj *obj)
sigaddset(&action.sa_mask, SIGUSR1);
#ifdef SERVERTEXT
sigaddset(&action.sa_mask, SIGUSR2);
#endif
#endif
action.sa_flags = SA_RESTART;
if ( sigaction( SIGTERM, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
Expand All @@ -267,13 +268,13 @@ void afp_over_asp(AFPObj *obj)
#endif /* SERVERTEXT */

/* SIGUSR1 - set down in 5 minutes */
action.sa_handler = afp_asp_timedown;
action.sa_handler = afp_asp_timedown;
sigemptyset( &action.sa_mask );
sigaddset(&action.sa_mask, SIGHUP);
sigaddset(&action.sa_mask, SIGTERM);
#ifdef SERVERTEXT
sigaddset(&action.sa_mask, SIGUSR2);
#endif
#endif
action.sa_flags = SA_RESTART;
if ( sigaction( SIGUSR1, &action, NULL ) < 0 ) {
LOG(log_error, logtype_afpd, "afp_over_asp: sigaction: %s", strerror(errno) );
Expand Down
1 change: 1 addition & 0 deletions etc/afpd/afp_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <atalk/errchk.h>
#include <atalk/fce_api.h>
#include <atalk/globals.h>
#include <atalk/nbp.h>

#ifdef HAVE_LDAP
#include <atalk/ldapconfig.h>
Expand Down
8 changes: 4 additions & 4 deletions etc/afpd/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <atalk/adouble.h>
#include <atalk/afp.h>
#include <atalk/asp.h>
#include <atalk/bstradd.h>
#include <atalk/bstrlib.h>
#include <atalk/cnid.h>
Expand Down Expand Up @@ -762,9 +763,9 @@ static int read_file(const struct ofork *ofork, int eid, off_t offset, char *rbu

if ((size_t)cc < *rbuflen)
eof = 1;

*rbuflen = cc;

if ( eof ) {
return( AFPERR_EOF );
}
Expand Down Expand Up @@ -844,7 +845,7 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf _U_
#endif

case AFPPROTO_DSI:
dsi = obj->dsi;
dsi = obj->dsi;
/* reqcount isn't always truthful. we need to deal with that. */
size = ad_size(ofork->of_ad, eid);

Expand Down Expand Up @@ -1401,4 +1402,3 @@ int afp_getforkparams(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, s
memcpy(rbuf, &bitmap, sizeof( bitmap ));
return( AFP_OK );
}

5 changes: 3 additions & 2 deletions etc/afpd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <atalk/errchk.h>
#include <atalk/globals.h>
#include <atalk/logger.h>
#include <atalk/nbp.h>
#include <atalk/netatalk_conf.h>
#include <atalk/paths.h>
#include <atalk/server_child.h>
Expand Down Expand Up @@ -490,7 +491,7 @@ int main(int ac, char **av)
case AFPPROTO_ASP:
asp_start(&asp_obj, server_children);
break;
#endif /* no afp/asp */
#endif /* no afp/asp */
default:
LOG(log_debug, logtype_afpd, "main: unknown protocol type");
break;
Expand Down Expand Up @@ -562,4 +563,4 @@ static void asp_cleanup(const AFPObj* obj)
nbp_unrgstr(obj->Obj, obj->Type, obj->Zone,
&obj->options.ddpaddr);
}
#endif /* no afp/asp */
#endif /* no afp/asp */

0 comments on commit 8751084

Please sign in to comment.