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

error: use of undeclared identifier 'M_PI' #498

Open
yurivict opened this issue Jun 23, 2024 · 1 comment
Open

error: use of undeclared identifier 'M_PI' #498

yurivict opened this issue Jun 23, 2024 · 1 comment

Comments

@yurivict
Copy link

/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.17-master/oscplot.c:601:3: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]
  601 |                 gettimeofday(&(priv->last_update), NULL);
      |                 ^
/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.17-master/oscplot.c:899:20: error: use of undeclared identifier 'M_PI'
  899 |                 double a = 2.0 * M_PI / (n - 1);
      |                                  ^
/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.17-master/oscplot.c:910:14: error: use of undeclared identifier 'M_PI'
  910 |                 double a = M_PI * j / (n - 1);
      |                            ^
/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.17-master/oscplot.c:914:34: error: use of undeclared identifier 'M_PI'
  914 |                 return a0 - a1 * cos(j * 2.0 * M_PI / (n - 1));
      |                                                ^

Version: 0.17

@yurivict
Copy link
Author

This is caused by -D_POSIX_C_SOURCE=200809L.
Removing it fixes the problem.

FreeBSD 14.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant