Changeset 238 in openpam for trunk/lib


Ignore:
Timestamp:
May 25, 2003, 1:41:46 PM (16 years ago)
Author:
Dag-Erling Smørgrav
Message:

Use RTLD_NOW where available, and define it to RTLD_LAZY otherwise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_dynamic.c

    r234 r238  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#11 $
     34 * $P4: //depot/projects/openpam/lib/openpam_dynamic.c#12 $
    3535 */
    3636
     
    4343
    4444#include "openpam_impl.h"
     45
     46#ifndef RTLD_NOW
     47#define RTLD_NOW RTLD_LAZY
     48#endif
    4549
    4650/*
     
    6569        if (asprintf(&vpath, "%s.%d", path, LIB_MAJ) < 0)
    6670                goto buf_err;
    67         if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) {
     71        if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
    6872                openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
    6973                *strrchr(vpath, '.') = '\0';
    70                 if ((dlh = dlopen(vpath, RTLD_LAZY)) == NULL) {
     74                if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
    7175                        openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
    7276                        FREE(module);
Note: See TracChangeset for help on using the changeset viewer.