Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30447

storage/innobase/os/os0file.cc:1028:58: error: use of undeclared identifier 'O_DIRECT'

Details

    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.
      

      Attachments

        Issue Links

          Activity

            brad0 Brad Smith created issue -

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

            marko Marko Mäkelä added a comment - Thank you for the report. It looks like in MDEV-30136 I forgot to add some #ifdef O_DIRECT .
            marko Marko Mäkelä made changes -
            Field Original Value New Value
            marko Marko Mäkelä made changes -
            Fix Version/s 11.0 [ 28320 ]
            Assignee Marko Mäkelä [ marko ]
            Labels regression
            Priority Major [ 3 ] Blocker [ 1 ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]

            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.

            marko Marko Mäkelä added a comment - 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 .
            marko Marko Mäkelä made changes -
            issue.field.resolutiondate 2023-01-24 07:33:54.0 2023-01-24 07:33:54.219
            marko Marko Mäkelä made changes -
            Fix Version/s 11.0.1 [ 28548 ]
            Fix Version/s 11.0 [ 28320 ]
            Resolution Fixed [ 1 ]
            Status Confirmed [ 10101 ] Closed [ 6 ]

            People

              marko Marko Mäkelä
              brad0 Brad Smith
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.