Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

abs isn't declared #3613

Closed
yurivict opened this issue Aug 10, 2016 · 2 comments
Closed

abs isn't declared #3613

yurivict opened this issue Aug 10, 2016 · 2 comments
Labels
C-bug The issue contains a bug report

Comments

@yurivict
Copy link
Contributor

yurivict commented Aug 10, 2016

On FreeBSD:

src/video/videomode.cpp:66:12: error: use of undeclared identifier 'abs'
    return abs(this->width-other.width) + abs(this->height-other.height);

I have to patch it, add #include <stdlib.h>.

@sudden6
Copy link
Member

sudden6 commented Aug 10, 2016

Could you open a PR with that fix?

@sudden6 sudden6 added the C-bug The issue contains a bug report label Aug 10, 2016
@antis81
Copy link
Contributor

antis81 commented Aug 10, 2016

@yurivict You can actually use qAbs() which doesn't require such patches. :)

zetok added a commit to zetok/qTox that referenced this issue Aug 12, 2016
Apparently FreeBSD doesn't include by default `stdlib.h` that provides
`abs()`.

Fix suggested by @antis81.

Fixes qTox#3613.
zetok added a commit to zetok/qTox that referenced this issue Aug 14, 2016
Apparently FreeBSD doesn't include by default `stdlib.h` that provides
`abs()`.

Fix suggested by @antis81.

Fixes qTox#3613.
zetok added a commit to zetok/qTox that referenced this issue Aug 15, 2016
Apparently FreeBSD doesn't include by default `stdlib.h` that provides
`abs()`.

Fix suggested by @antis81.

Fixes qTox#3613.
@zetok zetok closed this as completed in 79c249b Aug 15, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-bug The issue contains a bug report
Projects
None yet
Development

No branches or pull requests

3 participants