Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Missing glibc 2.6 prereq for HAVE_ATOMIC dependency #1456

Closed
wants to merge 2 commits into from

2 participants

reflection Salvatore Sanfilippo
reflection

We have an environment where GCC > 4.0.1 (4.1.2) but glibc < 2.6 (2.5) (I know, weird). Thus linking would fail because even though HAVE_ATOMIC was set to true, there is no 'sync_add_and_fetch' . The simple one-line change is to also require glibc 2.6.

Salvatore Sanfilippo
Owner

Hello, when we test for GLIBC features, we test that actually GLIBC is being used and that the macro __GLIBC_PREREQ is defined, like that:

#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#define HAVE_SYNC_FILE_RANGE 1
#endif

Please could you make the change and test in your target system? I know it is trivial and I could make it but it is a good thing if we can get it tested in the target system. Thanks!

reflection

Your simple addition worked just fine on the 32-bit system I was testing on, thanks. I updated the pull request.

reflection

Bumping in hopes this will be pulled in soon. Thanks.

Matt Stancliff mattsta referenced this pull request from a commit in mattsta/redis
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
98f1f35
Matt Stancliff mattsta referenced this pull request from a commit in mattsta/redis
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
0e90b76
Matt Stancliff mattsta referenced this pull request
Closed

ALL simple issue fixes #1906

Matt Stancliff mattsta referenced this pull request from a commit in mattsta/redis
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
9963a87
Salvatore Sanfilippo antirez closed this pull request from a commit
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
7e9f24d
Salvatore Sanfilippo antirez closed this in 7e9f24d
Salvatore Sanfilippo antirez referenced this pull request from a commit
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
61ce627
Salvatore Sanfilippo antirez referenced this pull request from a commit
reflection reflection Improve accuracy of HAVE_ATOMIC dependency check
[I had to split out the clang check due to
 clang *really* not liking the __GLIBC_PREREQ macro; -matt]

Closes #1456
96614f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 9, 2013
  1. reflection
Commits on Dec 14, 2013
  1. reflection
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/config.h
4 src/config.h
View
@@ -187,9 +187,11 @@ void setproctitle(const char *fmt, ...);
#if (__i386 || __amd64) && __GNUC__
#define GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#if GNUC_VERSION >= 40100
+#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+#if (GNUC_VERSION >= 40100 && __GLIBC_PREREQ(2, 6))
#define HAVE_ATOMIC
#endif
#endif
+#endif
#endif
Something went wrong with that request. Please try again.