Skip to content

Commit

Permalink
declare __flock at least for __Z_EXPORT (#44)
Browse files Browse the repository at this point in the history
Otherwise linking to libzoslib.x fails due to unresolved symbol __flock.
  • Loading branch information
gabylb authored Jan 31, 2024
1 parent 600dfb4 commit 801f661
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/zos-io.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 801f661

Please sign in to comment.