Using a function (sched_getcpu) with glibc-2.5

Hello,

So this software I am working with was coded using glibc 2.12, but I have to make it run with glibc-2.5. So far the only problem I have found when compiling is that the software uses the sched_getcpu() function. But, I looked it up and apparently sched_getcpu() has only been available since glibc-2.6. So, I need an alternate function/solution that does the same thing as sched_getcpu(). Is there an alternate pre-glibc-2.6 equivalent function I could use? I was also thinking of trying to find the code for the function online and trying to write an equivalent...but I am fairly new to coding/programming(is there a diff?) and the stuff I am finding is making little sense(I am finding stuff on macros which I have no exp. with)...I am still searching but any help would be much appreciated.

On a side note, I think I understand static vs. dynamic libraries and why they would be useful, but I do not know what these libraries are when coding. How can I tell if the library I am using is static or dynamic? and are the glibc libraries static or dynamic? This is important because another option I was thinking about would be to upgrade to a recent glibc library, but if I do that and it turns out glibc is dynamic then I would have to uprgrade evry system this software is supposed to run on (they are all glibc 2.5) because using dynamic libraries would make the software dependent on the local system libraries (right?).

Again, I am new to this so sorry if my questions don't make much sense.
I am working with was coded using glibc 2.12 ... I need an alternate function/solution that does the same thing as sched_getcpu()
Pull the source out of 2.6 and put it in a suplimentary lib that you include in your project.
Topic archived. No new replies allowed.