[MDEV-30447] storage/innobase/os/os0file.cc:1028:58: error: use of undeclared identifier 'O_DIRECT' Created: 2023-01-22  Updated: 2023-01-24  Resolved: 2023-01-24

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 11.0.0
Fix Version/s: 11.0.1

Type: Bug Priority: Blocker
Reporter: Brad Smith Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: regression
Environment:

OpenBSD


Issue Links:
Problem/Incident
is caused by MDEV-30136 Map innodb_flush_method to new settab... Closed

 Description   

Trying to build 11.0.0 on OpenBSD I ran into.. OpenBSD does not support direct I/O.

/home/ports/pobj/mariadb-11.0.0/bin/c++ -DBTR_CUR_ADAPT -DBTR_CUR_HASH_ADAPT -DHAVE_CONFIG_H -DHAVE_OPENSSL -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/wsrep-lib/include -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/wsrep-lib/wsrep-API/v26 -I/home/ports/pobj/mariadb-11.0.0/build-amd64/include -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/include/providers -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/storage/innobase/include -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/storage/innobase/handler -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/libbinlogevents/include -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/tpool -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/include -I/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/sql -O2 -pipe  -I/usr/local/include -fstack-protector --param=ssp-buffer-size=4 -Wconversion -Wno-sign-conversion -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF  -fvisibility=hidden -std=gnu++11 -MD -MT storage/innobase/CMakeFiles/innobase.dir/os/os0file.cc.o -MF storage/innobase/CMakeFiles/innobase.dir/os/os0file.cc.o.d -o storage/innobase/CMakeFiles/innobase.dir/os/os0file.cc.o -c /home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/storage/innobase/os/os0file.cc
/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/	
        int direct_flag = fil_system.is_buffered() ? 0 : O_DIRECT;
                                                         ^
/home/ports/pobj/mariadb-11.0.0/mariadb-11.0.0/storage/innobase/os/os0file.cc:1173:5: error: use of undeclared identifier 'O_DIRECT'
                ? O_DIRECT : 0;
                  ^
2 errors generated.



 Comments   
Comment by Marko Mäkelä [ 2023-01-23 ]

Thank you for the report. It looks like in MDEV-30136 I forgot to add some #ifdef O_DIRECT.

Comment by Marko Mäkelä [ 2023-01-24 ]

I was able to reproduce this on GNU/Linux by replacing all occurrences of O_DIRECT with O_DIREKT. Indeed, those two occurrences are not guarded by an #ifdef.

Generated at Thu Feb 08 10:16:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.