Depends on how it's being used... coercing the pointer to it to a long sometimes works.
iirc, I had to do something similar to your below impl with the balancer stuff for maintaining balancer-manager changes across reboots. > On Oct 29, 2014, at 6:41 AM, Yann Ylavic <ylavic....@gmail.com> wrote: > > Hi, > > while working on PR44736, I needed an unique identifier for a vhost > (and/or the main server), given the server_rec. > > I chose to use (MD5 digest) all the IP:port from the s->addrs list > (ie. <VitualHost IP|*|_default_:port ...>), plus s->server_hostname > and s->port (ie. ServerName, be it configured or not, knowing that in > the latter case, apr_gethostname() is used fot the main server, and > the main server's one is used for the vhosts). > > Am I correct to assume that should two or more vhosts have this same > identifier, the first one would always be elected to handle the > requests, so the others are just ignored doublons ignored during > runtime? > > This concerns 2.2.x, but probably the same should hold for 2.4.x > (please correct me if I am wrong). > > Regards, > Yann.