Skip to content

Commit

Permalink
Fix building Connect storage engine ioapi code on OpenBSD / NetBSD / …
Browse files Browse the repository at this point in the history
…DragonFly
  • Loading branch information
brad0 authored and grooverdan committed Jul 25, 2022
1 parent 95989e8 commit e55c3dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions storage/connect/ioapi.c
Expand Up @@ -14,8 +14,7 @@
#define _CRT_SECURE_NO_WARNINGS
#endif

#if defined(__APPLE__) || defined(IOAPI_NO_64)
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
#if defined(IOAPI_NO_64)
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
#define FTELLO_FUNC(stream) ftello(stream)
#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin)
Expand Down
5 changes: 3 additions & 2 deletions storage/connect/ioapi.h
Expand Up @@ -21,7 +21,7 @@
#ifndef _ZLIBIOAPI64_H
#define _ZLIBIOAPI64_H

#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__))
#if defined(__linux__)

// Linux needs this to support file operation on files larger then 4+GB
// But might need better if/def to select just the platforms that needs them.
Expand Down Expand Up @@ -50,7 +50,8 @@
#define ftello64 ftell
#define fseeko64 fseek
#else
#ifdef __FreeBSD__
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
defined(__OpenBSD__) || defined(__DragonFly__)
#define fopen64 fopen
#define ftello64 ftello
#define fseeko64 fseeko
Expand Down

0 comments on commit e55c3dc

Please sign in to comment.