Add anetSetReuseAddr(err, fd) static function.
Add anetSetReuseAddr(err, fd) static function.

Extract setting SO_REUSEADDR socket option into separate function
so the same code can be more easily used by anetCreateSocket and
other functions.

francischan714/redis,takeshineshiro/redis,gilala/hredis,rouzier/redis,allengaller/redis,ErikDubbelboer/redis,buobao/redis-3.0-annotated,healerkx/redis,antirez/redis,gilala/hbjredis,SyntaxStacks/redis,colstrom/redis,seandsky/redis,pcarrier/redis,shshlzh/redis-3.0-annotated,LongXQ/redis,idning/redis,jxwr/redis,a-pavlov/redis,j0hnma/hszredis,Hailei/redis,4396/redis,duanx/redis,spearhead-ea/redis,guker/redis,0x55/redis-3.0-annotated,narma/redis,holstvoogd/redis,seppo0010/redis,AALEKH/redis,zhoudayang/redis,splitice/redis,LongXQ/redis,miaoyc1989/redis-3.0-annotated,huyuezheng/redis,whille/redis-3.0-annotated,nilyang/redis-tdd-annotation,wprice/redis,antirez/redis,gaoxianglong/redis,arijitvt/redis,wangyikai/redis,alenslan/redis,thomasdarimont/redis,haima-zju/redis-3.0-annotated,j0hnma/szredis,vincent-vivian-liu/redis,seandsky/redis,zhaobo1023/redis-3.0-annotated,rrsean/redis-3.0-annotated,pedigree/redis,ErikDubbelboer/redis,yossigo/redis,xlzhan/redis,adamweixuan/redis-3.0-annotated,PKRoma/redis,GitHubMota/redis,wbailey5/redis,yuhc/redis-benchmark-enhanced,PradheepShrinivasan/redis,josiahcarlson/redis,jbochi/redis,maodeyi/redis_lua,whille/redis-3.0-annotated,LongXQ/redis,clamoriniere1A/redis,timothyohare/3rdPartySrc-redis,saisai/redis,jasonkying/redis,RepmujNetsik/redis,badboy/redis,ytjiang/redis,ytjiang/redis,idning/redis,MasahikoSawada/redis,wuyu201321060203/redis-3.0-annotated,ttuna/msot-redis,cusspvz/redis,shreesundara/redis,CodeJuan/redis,huangz1990/experiment-redis,CodeJuan/redis,alenslan/redis,jackyan/redis,Sciumo/redis,h0x91b/redis,roth1002/redis,CodeJuan/redis,mengzhejin/RedisStudy,yuhc/redis-benchmark-enhanced,huangz1990/redis-3.0-annotated,ketor/redis,itugs/redis,unasm/redis-3.0-annotated,pmem/redis,qiyang0221/redis,Soledad89/redis,himoca/redis,ksarch-saas/redis,pedigree/redis,a-pavlov/redis,AplayER/redis,cnbin/redis,ctripcorp/redis,haima-zju/redis-3.0-annotated,spinlock/redis,mattsta/redis,Markgorden/redis,xujunhai1991/redis,soloestoy/redis,kaushik94/redis,JoeWoo/redis,GrimDerp/redis,fankeke/redis-3.0-annotated,rouzier/redis,hgl888/redis,SyntaxStacks/redis,NBSW/redis,tzq668766/redis-3.0-annotated,wprice/redis,mumingv/redis,weizijun/redis,Hailei/redis,mgk/redis,takeshineshiro/redis,roth1002/redis,gilala/hredis,gilala/redis,mengyou0304/redis,nnog/redis,Aaron1992/redis,ErikDubbelboer/redis,rogerlz/redis,StevenTsai/redis,taoguan/redis,twskipper/redis,colstrom/redis,blackmady/redis,Soledad89/redis,ytjiang/redis,iandyh/redis,elkingtonmcb/redis,yuzhangjob/redis-3.0-annotated-unstable,valdsJohn/redis,sunlianqiang/redis-3.0-annotated,zguangyu/redis,NBSW/redis,yuhc/redis-benchmark-enhanced,ituncle/redis,saisai/redis,ipmobiletech/redis,atreeyang/redis,z-fork/redis,msn217/redis-3.0-annotated,itamarhaber/redis,z-fork/redis,zhaobo1023/redis-3.0-annotated,gilala/bjredis,itugs/redis,slfs007/mk-redis,charsyam/redis,brg-liuwei/redis,oranagra/redis,ReadCode/redis-3.0-annotated,ofirluzon/redis,colstrom/redis,kmiku7/redis,StevenTsai/redis,j0hnma/hszredis,SummonY/redis,yossigo/redis,brg-liuwei/redis,taoguan/redis,ctripcorp/redis,charsyam/redis,soveran/redis,takeshineshiro/redis,modulexcite/redis,yuzhangjob/redis-3.0-annotated-unstable,cloudrain21/redis,mengzhejin/RedisStudy,louisliangjun/redis,izhoujie/redis,GitHubMota/redis,ksarch-saas/redis,thomasdarimont/redis,kaushik94/redis,harrisonfeng/redis,charsyam/redis,zhcy/redis,Aliceljm1/redis,hawkchch/redis,aim-for-better/redis,magastzheng/redis-3.0-annotated,supasate/redis,supasate/redis,rouzier/redis,mgk/redis,Soledad89/redis,xlzhan/redis,nilyang/redis-tdd-annotation,wbailey5/redis,gaoxianglong/redis,Wangyao14cyy/redis,drinkthere/redis-3.0-annotated,zy416548283/redis-3.0-annotated,soveran/redis,flashbuckets/redis,gilala/hredis,zczhuohuo/redis,darksideofthemoo/redis-histogram,kensou97/redis,YuanZhewei/redis,pmem/redis,jbochi/parallel_redis,wangyikai/redis,moonbingbing/redis-3.0-annotated,ketor/redis,gilala/bjredis,alenslan/redis,hgl888/redis,badboy/redis,healerkx/redis,Wangyao14cyy/redis,mengzhejin/RedisStudy,darksideofthemoo/redis-histogram,Wangyao14cyy/redis,blackmady/redis,ttuna/msot-redis,spinlock/redis,louisliangjun/redis,Aliceljm1/redis,jackyan/redis,davidradunz/redis,jingjidejuren/redis,Sciumo/redis,tjschuck/redis,ramonsnir/redis,davidradunz/redis,mcanthony/redis,duanx/redis,Aaron1992/redis,seppo0010/rlite-server,arijitvt/redis,yossigo/redis,nnog/redis,MSOpenTech/redis,mattsta/redis,itamarhaber/redis,mverrilli/redis,holstvoogd/redis,neomantra/redis,drinkthere/redis-3.0-annotated,fankeke/redis-3.0-annotated,OmarQunsul/graph-redis,aim-for-better/redis,citusdata/redis,zhaobo1023/redis-3.0-annotated,cusspvz/redis,ReadCode/redis-3.0-annotated,sunheehnus/redis,louisliangjun/redis,dreamquster/redis,onlymellb/redis-3.0-annotated,CodeJuan/redis,soloestoy/redis,iandyh/redis,zguangyu/redis,fengshao0907/redis,OmarQunsul/graph-redis,dongqifan2/redis-3.0-annotated,gilala/bjredis,izhoujie/redis,SummonY/redis,wenxueliu/redis_comment,mcanthony/redis,190235047/redis,mingyaaaa/redis,HunanTV/redis,valdsJohn/redis,yybirdcf/learn-redis,qiyang0221/redis,a-pavlov/redis,maodeyi/redis_lua,universsky/redis,jbochi/parallel_redis,ipmobiletech/redis,gongice/redis-3.0-annotated,josiahcarlson/redis,saisai/redis,gilala/hbjredis,takeshineshiro/redis,pkdevbox/redis,mengyou0304/redis,HouKangkang/redis-3.0-annotated,hawkchch/redis,kaushik94/redis,himoca/redis,kensou97/redis,spearhead-ea/redis,mgk/redis,fengshao0907/redis-3.0-annotated,StevenTsai/redis,harrisonfeng/redis,ncopa/redis,narma/redis,guker/redis,fengshao0907/redis,holstvoogd/redis,dayuoba/redis,yybirdcf/learn-redis,linfangrong/redis,AplayER/redis,july2993/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,ErikDubbelboer/redis,josiahcarlson/redis,slfs007/mk-redis,soloestoy/redis,seppo0010/rlite-server,thomasdarimont/redis,xujunhai1991/redis,YuraLukashik/redis,Markgorden/redis,neomantra/redis,riyan8250/redis,valdsJohn/redis,allengaller/redis,slfs007/mk-redis,zhiliaoniu/redis,NBSW/redis,mumingv/redis-3.0-annotated,YuraLukashik/redis,AplayER/redis,GitHubMota/redis,jasonkying/redis,elkingtonmcb/redis,seppo0010/redis,ncopa/redis,linfangrong/redis,abhiklodh/redis,arijitvt/redis,badboy/redis,Aaron1992/redis,hedisdb/hedis,LongXQ/redis,RepmujNetsik/redis,tjschuck/redis,maodeyi/redis_lua,modulexcite/redis,programmecat/redis,arijitvt/redis,universsky/redis,gilala/redis,ksarch-saas/redis,fengshao0907/redis,oranagra/redis,rogerchina/redis,hgl888/redis,190235047/redis,hawkchch/redis,SummonY/redis,janekmi/redis,yuzhangjob/redis-3.0-annotated-unstable,msn217/redis-3.0-annotated,tellapart/redis,tellapart/redis,weizijun/redis,hornen/redis,cloudrain21/redis,fengshao0907/redis-3.0-annotated,tjschuck/redis,jxwr/redis,wenxueliu/redis_comment,netroby/redis,ofirluzon/redis,spinlock/redis,AALEKH/redis,allengaller/redis,ton31337/redis,taoguan/redis,HunanTV/redis,huyuezheng/redis,rouzier/redis,xuzhezhaozhao/redis_reading,zguangyu/redis,nuxeh/redis,jingjidejuren/redis,zhiliaoniu/redis,elkingtonmcb/redis,tzq668766/redis-3.0-annotated,WorkingOfTimtohyZhang/redis-3.0-annotated,cnbin/redis,qiyang0221/redis,shining-yang/redis,jasonkying/redis,programmecat/redis,qiyang0221/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,ofirluzon/redis,xuzhezhaozhao/redis_reading,fengshao0907/redis,rogerlz/redis,HunanTV/redis,gilala/hbjredis,gechong/redis-3.0-annotated,blackmady/redis,tellapart/redis,Hailei/redis,dreamquster/redis,shining-yang/redis,cnbin/redis,xuguruogu/redis,zhcy/redis,MOON-CLJ/redis,jacklee0810/redis-3.0-annotated,nuxeh/redis,louisliangjun/redis,Aliceljm1/redis-3.0-annotated,itugs/redis,hawkchch/redis,Aliceljm1/redis-3.0-annotated,ouyangkongtong/redis,iandyh/redis,YongMan/redis,Aaron1992/redis,j0hnma/szredis,Soledad89/redis,csuhawk/redis,HeartSaVioR/redis,mengyou0304/redis,zy416548283/redis-3.0-annotated,Hailei/redis,RepmujNetsik/redis,0x55/redis-3.0-annotated,jacklee0810/redis-3.0-annotated,PradheepShrinivasan/redis,0x55/redis-3.0-annotated,mengzhejin/RedisStudy,zhiliaoniu/redis,MSOpenTech/redis,wprice/redis,0x55/redis-3.0-annotated,ouyangkongtong/redis,yuhc/redis-benchmark-enhanced,jbochi/parallel_redis,modulexcite/redis,kmiku7/redis,honestme/redis,sunheehnus/redis,huyuezheng/redis,soloestoy/redis,simplestbest/redis,gaoxianglong/redis,himoca/redis,huangz1990/experiment-redis,guker/redis,PKRoma/redis,hedisdb/hedis,ttuna/msot-redis,duanx/redis,sunlianqiang/redis-3.0-annotated,shreesundara/redis,netroby/redis,abhiklodh/redis,nilyang/redis-tdd-annotation,brg-liuwei/redis,holstvoogd/redis,wuyu201321060203/redis-3.0-annotated,charsyam/redis,honestme/redis,supasate/redis,gongice/redis-3.0-annotated,OmarQunsul/graph-redis,SummonY/redis,adamweixuan/redis-3.0-annotated,ouyangkongtong/redis,MOON-CLJ/redis,ton31337/redis,dreamquster/redis,MasahikoSawada/redis,YongMan/redis,kaushik94/redis,flashbuckets/redis,mgk/redis,mumingv/redis,huyuezheng/redis,neomantra/redis,wuyu201321060203/redis-3.0-annotated,pedigree/redis,gilala/hbjredis,allengaller/redis,Aliceljm1/redis-3.0-annotated,zguangyu/redis,YuraLukashik/redis,wenxueliu/redis_comment,z-fork/redis,blackmady/redis,zczhuohuo/redis,Sciumo/redis,onlymellb/redis-3.0-annotated,ncopa/redis,csuhawk/redis,shining-yang/redis,hornen/redis,Markgorden/redis,mverrilli/redis,HunanTV/redis,universsky/redis,davidradunz/redis,riyan8250/redis,simplestbest/redis,ouyangkongtong/redis,YuanZhewei/redis,oranagra/redis,ketor/redis,huangz1990/experiment-redis,dayuoba/redis,pkdevbox/redis,janekmi/redis,idning/redis,ReadCode/redis-3.0-annotated,antirez/redis,xujunhai1991/redis,spearhead-ea/redis,ton31337/redis,twskipper/redis,jasonkying/redis,xuguruogu/redis,yybirdcf/learn-redis,tanghaodong25/redis,ctripcorp/redis,abhiklodh/redis,gilala/hredis,MasahikoSawada/redis,soveran/redis,linfangrong/redis,wuyu201321060203/redis-3.0-annotated,honestme/redis,weizijun/redis,idning/redis,PKRoma/redis,h0x91b/redis,huangz1990/experiment-redis,netroby/redis,narma/redis,190235047/redis,simplestbest/redis,190235047/redis,cloudrain21/redis,weizijun/redis,citusdata/redis,h0x91b/redis,csuhawk/redis,GrimDerp/redis,AplayER/redis,z-fork/redis,dongqifan2/redis-3.0-annotated,xuzhezhaozhao/redis_reading,splitice/redis,cusspvz/redis,jingjidejuren/redis,ncopa/redis,shshlzh/redis-3.0-annotated,kmiku7/redis,timothyohare/3rdPartySrc-redis,soloestoy/redis,OmarQunsul/graph-redis,tzq668766/redis-3.0-annotated,shreesundara/redis,mumingv/redis-3.0-annotated,nilyang/redis-tdd-annotation,july2993/redis,riyan8250/redis,tanghaodong25/redis,clamoriniere1A/redis,ituncle/redis,Markgorden/redis,fengshao0907/redis-3.0-annotated,gilala/redis,ttuna/msot-redis,4396/redis,PradheepShrinivasan/redis,rogerlz/redis,AALEKH/redis,sunlianqiang/redis-3.0-annotated,whille/redis-3.0-annotated,gilala/redis,hedisdb/hedis,ramonsnir/redis,mattsta/redis,mengyou0304/redis,honestme/redis,charsyam/redis,j0hnma/szredis,zhoudayang/redis,MasahikoSawada/redis,wujf/redis,dongqifan2/redis-3.0-annotated,davidradunz/redis,francischan714/redis,wenxueliu/redis_comment,wangyikai/redis,simplestbest/redis,pkdevbox/redis,jxwr/redis,spinlock/redis,sunheehnus/redis,MOON-CLJ/redis,AALEKH/redis,hgl888/redis,4396/redis,zhcy/redis,magastzheng/redis-3.0-annotated,healerkx/redis,h0x91b/redis,MSOpenTech/redis,haima-zju/redis-3.0-annotated,SyntaxStacks/redis,Wangyao14cyy/redis,ton31337/redis,hedisdb/hedis,nnog/redis,riyan8250/redis,alenslan/redis,zczhuohuo/redis,wbailey5/redis,oranagra/redis,aim-for-better/redis,citusdata/redis,flashbuckets/redis,universsky/redis,ytjiang/redis,tanghaodong25/redis,saisai/redis,YongMan/redis,HeartSaVioR/redis,seppo0010/rlite-server,j0hnma/hszredis,modulexcite/redis,gechong/redis-3.0-annotated,fankeke/redis-3.0-annotated,pcarrier/redis,yossigo/redis,harrisonfeng/redis,YuanZhewei/redis,rogerlz/redis,ituncle/redis,july2993/redis,flashbuckets/redis,yybirdcf/learn-redis,nuxeh/redis,YongMan/redis,cusspvz/redis,msn217/redis-3.0-annotated,xuguruogu/redis,roth1002/redis,a-pavlov/redis,ituncle/redis,mingyaaaa/redis,xujunhai1991/redis,seandsky/redis,onlymellb/redis-3.0-annotated,ctripcorp/redis,vincent-vivian-liu/redis,rogerchina/redis,JoeWoo/redis,adamweixuan/redis-3.0-annotated,harrisonfeng/redis,jacklee0810/redis-3.0-annotated,devaos/redis,sunheehnus/redis,jackyan/redis,ofirluzon/redis,neomantra/redis,netroby/redis,programmecat/redis,seppo0010/rlite-server,xuzhezhaozhao/redis_reading,atreeyang/redis,mverrilli/redis,neomantra/redis,atreeyang/redis,iandyh/redis,pmem/redis,JoeWoo/redis,cloudrain21/redis,wujf/redis,Aliceljm1/redis,vincent-vivian-liu/redis,ipmobiletech/redis,hornen/redis,seppo0010/redis,mumingv/redis,brg-liuwei/redis,clamoriniere1A/redis,twskipper/redis,healerkx/redis,buobao/redis-3.0-annotated,dreamquster/redis,darksideofthemoo/redis-histogram,pcarrier/redis,moonbingbing/redis-3.0-annotated,jingjidejuren/redis,xlzhan/redis,j0hnma/szredis,buobao/redis-3.0-annotated,splitice/redis,roth1002/redis,kmiku7/redis,moonbingbing/redis-3.0-annotated,zy416548283/redis-3.0-annotated,kensou97/redis,magastzheng/redis-3.0-annotated,miaoyc1989/redis-3.0-annotated,janekmi/redis,timothyohare/3rdPartySrc-redis,tanghaodong25/redis,HouKangkang/redis-3.0-annotated,linfangrong/redis,elkingtonmcb/redis,GrimDerp/redis,guker/redis,NBSW/redis,PradheepShrinivasan/redis,francischan714/redis,zhoudayang/redis,SyntaxStacks/redis,huangz1990/redis-3.0-annotated,MSOpenTech/redis,ttuna/msot-redis,YuanZhewei/redis,pkdevbox/redis,francischan714/redis,taoguan/redis,mcanthony/redis,jackyan/redis,gaoxianglong/redis,timothyohare/3rdPartySrc-redis,devaos/redis,dayuoba/redis,unasm/redis-3.0-annotated,HeartSaVioR/redis,zhcy/redis,soveran/redis,huangz1990/redis-3.0-annotated,PKRoma/redis,wbailey5/redis,cnbin/redis,janekmi/redis,izhoujie/redis,zhiliaoniu/redis,twskipper/redis,wangyikai/redis,xuguruogu/redis,atreeyang/redis,JoeWoo/redis,badboy/redis,shshlzh/redis-3.0-annotated,gongice/redis-3.0-annotated,valdsJohn/redis,jbochi/redis,mingyaaaa/redis,splitice/redis,supasate/redis,devaos/redis,mumingv/redis,itugs/redis,drinkthere/redis-3.0-annotated,yossigo/redis,colstrom/redis,gechong/redis-3.0-annotated,wprice/redis,thomasdarimont/redis,dayuoba/redis,Sciumo/redis,miaoyc1989/redis-3.0-annotated,kensou97/redis,hornen/redis,shshlzh/redis-3.0-annotated,Aliceljm1/redis,josiahcarlson/redis,rogerchina/redis,YuraLukashik/redis,xlzhan/redis,PKRoma/redis,mingyaaaa/redis,citusdata/redis,shining-yang/redis,nuxeh/redis,devaos/redis,HeartSaVioR/redis,unasm/redis-3.0-annotated,pedigree/redis,jbochi/redis,StevenTsai/redis,ramonsnir/redis,programmecat/redis,clamoriniere1A/redis,zhoudayang/redis,GitHubMota/redis,4396/redis,tjschuck/redis,j0hnma/hszredis,mcanthony/redis,antirez/redis,rrsean/redis-3.0-annotated,darksideofthemoo/redis-histogram,HouKangkang/redis-3.0-annotated,GrimDerp/redis,wujf/redis,abhiklodh/redis,nnog/redis,itamarhaber/redis,duanx/redis,july2993/redis,pcarrier/redis,zczhuohuo/redis,seandsky/redis,seppo0010/redis,MSOpenTech/redis,wujf/redis,vincent-vivian-liu/redis,gilala/bjredis,aim-for-better/redis,mverrilli/redis,itamarhaber/redis,csuhawk/redis,ipmobiletech/redis,ksarch-saas/redis,izhoujie/redis,mumingv/redis-3.0-annotated,rrsean/redis-3.0-annotated,RepmujNetsik/redis,rogerchina/redis,shreesundara/redis,miaoyc1989/redis-3.0-annotated,tellapart/redis,oranagra/redis,ofirluzon/redis,pmem/redis