From 801f6616e1d4fed7b87b54c9d567a58e23a4c537 Mon Sep 17 00:00:00 2001 From: Gaby Baghdadi Date: Wed, 31 Jan 2024 16:32:19 -0500 Subject: [PATCH] declare __flock at least for __Z_EXPORT (#44) Otherwise linking to libzoslib.x fails due to unresolved symbol __flock. --- include/zos-io.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/zos-io.h b/include/zos-io.h index 916e49e..bf92e4f 100644 --- a/include/zos-io.h +++ b/include/zos-io.h @@ -79,6 +79,14 @@ __Z_EXPORT int __console_printf(const char *fmt, ...); __Z_EXPORT int __find_file_in_path(char *out, int size, const char *envvar, const char *file); +/** + * Apply or remove an advisory lock on an open file + * \param [in] fd file descriptor of the open file + * \param [in] operation is one of LOCK_SH, LOCK_EX or LOCK_UN + * \return returns 0 if successful, or -1 on failure. + */ +__Z_EXPORT int __flock(int fd, int operation); + /** * Change file descriptor to CCSID. * \param [in] fd file descriptor.