Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing include of <ctime> to fix build with glibc 2.36 #2533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 6, 2022

  1. Add missing include of <ctime> to fix build with glibc 2.36

    | include/openbabel/obutil.h:65:14: error: 'clock' was not declared in this scope
    |    65 |       start= clock();
    |       |              ^~~~~
    | include/openbabel/obutil.h:40:1: note: 'clock' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
    |    39 | #include <math.h>
    |   +++ |+#include <ctime>
    |    40 |
    | include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()':
    | include/openbabel/obutil.h:70:13: error: 'clock' was not declared in this scope
    |    70 |       stop= clock();
    |       |             ^~~~~
    | include/openbabel/obutil.h:70:13: note: 'clock' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
    | include/openbabel/obutil.h:71:40: error: 'CLOCKS_PER_SEC' was not declared in this scope
    |    71 |       return((stop - start) / (double) CLOCKS_PER_SEC);
    |       |                                        ^~~~~~~~~~~~~~
    | include/openbabel/obutil.h:71:40: note: the macro 'CLOCKS_PER_SEC' had not yet been defined
    
    Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
    schnitzeltony committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    22a0578 View commit details
    Browse the repository at this point in the history