mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 22:45:06 -05:00
privops: refactor initialisation/finalisation
Rename PRV_Initialise() to PRV_StartHelper() and add a new initialisation function, which just sets the helper fd to -1. Move the initialision/finalisation calls from the system drivers to main.c. If privops is not included in the build, define empty macros for the function names, so their calls don't have to be wrapped in #ifdefs.
This commit is contained in:
@@ -48,7 +48,12 @@ int PRV_BindSocket(int sock, struct sockaddr *address, socklen_t address_len);
|
||||
|
||||
#ifdef PRIVOPS_HELPER
|
||||
void PRV_Initialise(void);
|
||||
void PRV_StartHelper(void);
|
||||
void PRV_Finalise(void);
|
||||
#else
|
||||
#define PRV_Initialise()
|
||||
#define PRV_StartHelper()
|
||||
#define PRV_Finalise()
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user